home *** CD-ROM | disk | FTP | other *** search
/ Megaware 1 / Megaware Volume 1.iso / utils / hd-test / hdtest.doc < prev    next >
Encoding:
Text File  |  1991-08-22  |  152.5 KB  |  2,662 lines

  1.           
  2.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  3.           _______________________________        _______________________________
  4.           
  5.           
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.                           HDTEST - Hard Disk Test/Repair Utility
  15.                           ______________________________________
  16.  
  17.                            Copyright (1984-1991), P. R. Fletcher
  18.                            _____________________________________
  19.                                     All Rights Reserved
  20.                                     ___________________
  21.  
  22.  
  23.  
  24.                         Distributed by:
  25.  
  26.                                P. R. Fletcher (Software)
  27.                                1515 West Montgomery Avenue
  28.                                Rosemont
  29.                                PA 19010
  30.  
  31.  
  32.  
  33.  
  34.  
  35.                                   _______
  36.                              ____|__     |               (r)
  37.                           --|       |    |-------------------
  38.                             |   ____|__  |  Association of
  39.                             |  |       |_|  Shareware
  40.                             |__|   o   |    Professionals
  41.                           -----|   |   |---------------------
  42.                                |___|___|    MEMBER
  43.  
  44.            
  45.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  46.           _______________________________        _______________________________
  47.           
  48.           
  49.                                      TABLE OF CONTENTS
  50.                                      _________________
  51.  
  52.  
  53.           User-Supported Software                                    1
  54.           Introduction                                               1
  55.           Getting Started - Installation                             5
  56.                           - Testing a Disk                           5
  57.           Hardware and Software Requirements                         7
  58.           Limitations and Restrictions                               9
  59.           Command Line Options - HDCHEK                             10
  60.                                - HDTEST                             13
  61.           What does HDTEST do?                                      16
  62.           Incremental Disk Testing                                  18
  63.           Using the On-Disk Pre-Boot                                18
  64.           Using the HD programs with SpeedStor and Disk Manager     21
  65.           Special considerations with SpeedStor                     22
  66.           Dealing with Bad Clusters                                 22
  67.           Running HDTEST from a .BAT file                           24
  68.           Bugs and Other Unpleasant Subjects                        25
  69.           Changes from Previous Versions                            25
  70.           Appendix A - Summary of Flag Settings                     31
  71.           Appendix B - A Hardware Tutorial                          33
  72.                      - Disk Error Reports                           36
  73.           Appendix C - Example Program Runs                         41
  74.           Registration Form                                         44
  75.            
  76.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  77.           _______________________________        _______________________________
  78.           
  79.           
  80.                                   USER-SUPPORTED SOFTWARE
  81.                                   _______________________
  82.  
  83.           Much of the software which is available for your computer has, in the
  84.           past, been produced and sold on the assumption that you are a crook
  85.           and that you will take any available opportunity to cheat software
  86.           writers and vendors out of their rightful reward. Such software was
  87.           copy-protected within an inch of its (and your computer's) life and
  88.           was priced at a level which still guaranteed its producers a profit
  89.           even if four or five illegal copies were made for each one sold.
  90.           Thankfully, prices of commercial software have (for the most part)
  91.           come down somewhat, and copy-protection is becoming much less
  92.           prevalent, but buying such software remains something of a lottery -
  93.           you often cannot be sure that the software does what you want in the
  94.           way you want it done until you have paid for it. User-supported
  95.           software (Shareware) is different. You may have got a copy of this
  96.           package free from a friend or a bulletin board or (for a nominal fee)
  97.           from a users' group or software library. In any case, you have a
  98.           perfectly legal working copy of the HDTEST package. You are encouraged
  99.           to make as many copies of the package as you like and to distribute
  100.           them to all your friends. If, after trying the program out, you find
  101.           that it is useful and want to continue to keep and use it, you must
  102.           register your copy by sending the registration fee ($35.00, unless you
  103.           are already a registered user of DIREDIT, in which case it is $25.00)
  104.           together with the completed registration form, to the address on the
  105.           form. Only your conscience can make you do this (although you are
  106.                                          ____                              
  107.           probably breaking the law if you don't), but bear in mind that the
  108.           distributors of "user-supported" software are making the assumption
  109.           that you are honest and willing to pay a reasonable price for a useful
  110.           program, many commercial software vendors, on the other hand, would
  111.           still apparently rather believe you are a crook. You can decide who
  112.           you would rather prove right. Registered users are entitled to
  113.           support, upgrades, and help with HDTEST-related problems (including
  114.           telephone support) for a year from the date of registration.
  115.  
  116.           This program is produced by a member of the Association of Shareware
  117.           Professionals (ASP).  ASP wants to make sure that the shareware
  118.           principle works for you. If you are unable to resolve a shareware-
  119.           related problem with an ASP member by contacting the member directly,
  120.           ASP may be able to help. The ASP Ombudsman can help you resolve a
  121.           dispute or problem with an ASP member, but does not provide technical
  122.           support for members' products. Please write to the ASP Ombudsman at
  123.           545 Grover Road, Muskegon, MI 49442-9427 or send a Compuserve message
  124.           via CompuServe Mail to ASP Ombudsman 70007,3536"
  125.  
  126.  
  127.                                        INTRODUCTION
  128.                                        ____________
  129.  
  130.           HDTEST was originally written to allow comprehensive Read/Write
  131.           testing of hard disks on IBM PCs, XTs, ATs, and "true" compatibles.
  132.           The V4.10 release removed many of the hardware restrictions imposed by
  133.           earlier (V2.xx and V3.xx) versions of the program and made it useful
  134.           for testing most MS-DOS-compatible storage devices currently in use on
  135.            
  136.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  137.           _______________________________        _______________________________
  138.           
  139.           
  140.           IBM-compatible computers, including removable (floppy and hard) disks
  141.           and logically partitioned hard disks. The V4.34 release included BIOS-
  142.           level support for DOS 3.3 (and above) "extended devices" and more
  143.           options for the handling of totally unreadable sectors. The V4.53
  144.           release added even more extensive support for IBM-incompatible
  145.           hardware and removed the requirement that ANSI.SYS be loaded to
  146.           support a proper screen display. Subsequent releases added full
  147.           support for the large (> 32Mb) devices allowed by DOS 4.0, the ability
  148.           to locate bad spots physically (by track, head, and sector) on the
  149.           disk, and some support for the use of .BAT files to run HDTEST on
  150.           multiple disks at one "sitting". The V5.20 release added INT 13 level
  151.           support for hard disks with more than 1024 heads which have been
  152.           partitioned by the SpeedStor or Disk Manager utilities, as well as
  153.           full support for proprietary Disk Manager and SpeedStor partitions
  154.           under DOS versions prior to 4.00 (or Compaq DOS 3.31). The V5.35
  155.           release included a number of changes and improvements, mainly aimed at
  156.           allowing the programs to be used on even bigger partitions.
  157.  
  158.           Although many programs, including IBM's diagnostics, allow "surface
  159.           scanning" and seek testing of hard disks, few that are available to
  160.           the average user test whether the whole disk can retain the data that
  161.           is or will be written to it. HDTEST's principal "claim to fame" is the
  162.           ability thoroughly to test the magnetic media in a device which
  163.           contains data while preserving the data (although data loss is
  164.                         _________________________                       
  165.           unavoidable if an area which is in use has become unreadable). HDTEST
  166.                                                               ____             
  167.           tests the disk much more thoroughly than programs such as DFixer,
  168.           Mace, and Norton's DT. Mace and DT, like many public domain "disk
  169.           test" programs, simply read every cluster on the disk and report on
  170.           any errors encountered.  DFixer does better, writing 4 test patterns
  171.           to every free cluster and checking that they can be read back
  172.           correctly, but it makes no attempt to test clusters that are already
  173.           in use - the very ones which contain your precious data! Disk
  174.           Technician (TM), a product which has come to market more recently,
  175.           is more closely comparable to HDTEST than any other disk testing
  176.           program that I know about. It is, however, much more expensive, is
  177.           (functionally, at least) copy-protected, and is not available as
  178.                                                           ___             
  179.           Shareware!
  180.  
  181.           In addition to its testing function, HDTEST has been reported to be
  182.           useful as an automatic disk repair utility for both hard and floppy
  183.           disks which have developed (especially) intermittent or persistent
  184.           read errors, preventing or impeding their normal use. Although HDTEST
  185.           cannot read the totally unreadable, it tries much harder that DOS does
  186.           and will almost always, in the course of its operation, allow you to
  187.           recover the entire readable portion(s) of a file with one or more
  188.                              ________                                      
  189.           unreadable clusters in it, optionally either remapping all of what it
  190.           reads from the disk or replacing bad sectors (the default) or clusters
  191.           with NULLs. HDTEST is not an alternative to backing up your floppies
  192.                                 ___                                           
  193.           and/or hard disk - it may sometimes be able to save your neck when you
  194.                                     _________                                   
  195.           forgot or your backup went bad too! On hard disks which have developed
  196.           intermittent read errors, running HDTEST can sometimes totally cure
  197.                                                    ___                       
  198.           the problem, presumably because the "flaky" sectors get rewritten and
  199.           
  200.           
  201.                                           Page 2 
  202.            
  203.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  204.           _______________________________        _______________________________
  205.           
  206.           
  207.           the minor misalignments and/or weakening of the magnetic "image" which
  208.           were causing the trouble are corrected when the data is rewritten. In
  209.           its default ("slow") mode, HDTEST writes 20 different test patterns to
  210.           every cluster on the disk and checks that each pattern can be read
  211.           _____                                                             
  212.           back correctly, while preserving (and eventually restoring) the
  213.           contents of the clusters that contain data.  HDTEST can even (on many
  214.           devices) detect hard disk errors which are minor enough to be
  215.           correctable (and corrected) by the disk controller's own "error-
  216.           correcting code" (ECC).  These errors are normally totally invisible
  217.           to programs running under DOS and will not usually be picked up by
  218.           other disk test utilities.  They may, however, be early signs of
  219.           problems that will become significant later, and HDTEST consequently
  220.           marks these clusters, too, as bad. As long as HDTEST can read the data
  221.           from a flaky cluster correctly once (and it tries quite hard) it will
  222.           be able to save the file of which that cluster is a part intact, while
  223.                                                                    ______       
  224.           marking the cluster so that DOS does not try to use it again. The
  225.           program was designed to minimize the likelihood of user error causing
  226.           data loss on a good (or slightly bad) disk, and to be as easy as
  227.           possible to use - it could not be made very fast, since multiple bit
  228.           patterns have to be written to and read from each cluster, and this
  229.           takes a significant time even on a fast hard disk. The program does,
  230.           however, have a less sensitive "fast" test mode, which writes only two
  231.           test patterns to each block and is recommended for use when
  232.           testing/repairing floppy disks and/or to correct intermittent problems
  233.           or rule out gross problems on a hard disk.
  234.  
  235.           The program can be used to test/repair single and double-sided 8- and
  236.           9-sector minifloppies (if you have plenty of patience!), as well as
  237.                                              ______                          
  238.           AT-format 1.2Mb minifloppies, 8" standard floppies, and 3.5"
  239.           microfloppies (with the same proviso regarding a need for patience).
  240.  
  241.           HDTEST's companion program, HDCHEK, simply examines the logical
  242.           structure of the system and target device and gives a short report on
  243.           what it finds. It does not write to the disk, and is provided
  244.                                  ___                                   
  245.           principally to allow a quick and easy, but fairly reliable, check on
  246.           the compatibility between HDTEST and a given software/hardware
  247.           configuration. As part of its report, HDCHEK notes at what level (DOS
  248.           interrupts only, INT 13, or direct entry to the BIOS) it was able to
  249.           access the target device, which has a bearing on HDTEST's ability to
  250.           detect certain types of errors. In general, if HDCHEK runs
  251.                                           __________                
  252.           successfully on a system and target device, then HDTEST can be
  253.           expected to do so, although the latter program requires much more
  254.           available memory.
  255.  
  256.           The HDTEST package is distributed as "User-supported Software". If you
  257.           intend to continue using the program, you are required to become a
  258.           Registered user. Send a completed copy of the Registration Form (which
  259.           is included in this documentation), together with a check or money
  260.           order for $35.00 (+ $5.00 for shipping outside the continent of North
  261.           America) to me at the address which appears on the form. Please also
  262.           add $2.50 (or equivalent) if you want the software on a 1.2 Mb HD
  263.           floppy or a 3.5" minifloppy, rather than a 360 Kb DSDD floppy, and
  264.           
  265.           
  266.                                           Page 3 
  267.            
  268.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  269.           _______________________________        _______________________________
  270.           
  271.           
  272.           specify which you want on the Reg. form. Checks and money orders in
  273.           denominations other than U.S. dollars are acceptable, but please add a
  274.           further $15.00 for bank charges before using the current exchange rate
  275.           to calculate the fee in the currency in which you are paying. On
  276.           receiving your Registration, I will send you a personalized copy of
  277.           the latest, enhanced, version of the HDTEST package (currently V5.40),
  278.           and register you for a year's support. Registration entitles you to be
  279.           notified of upgrades, bug fixes, newly discovered incompatibilities,
  280.           etc., and to ask for (and get) necessary help in adapting the program
  281.           to work on your hardware. I cannot guarantee to make HDTEST work with
  282.           every possible combination of hardware and software, but I will
  283.           promise to try to solve problems as they come up, and I will return
  284.           your Registration fee if I cannot support HDTEST on your system.
  285.           Support is available TO REGISTERED USERS ONLY by mail, BIXmail,
  286.                                ________________________                  
  287.           Compuserve EMail and telephone. Please also bear in mind that my
  288.           willingness and ability to continue to support and enhance these
  289.           programs will be directly dependent on users' willingness to pay the
  290.           Registration fee and (to some extent) inversely dependent on the
  291.           number of questions I get that could be answered by reading the docu-
  292.           mentation(!).
  293.  
  294.           The HD programs were written principally in C, compiled by the
  295.           Microsoft C compiler (Version 6.00A) using its "small" memory model,
  296.           and linked with code from the distributed Microsoft C object libraries
  297.           using the Microsoft Segmented Executable Linker (Version 5.13).
  298.           Portions of the distributed program are consequently Copyright (C) by
  299.           Microsoft Corp., 1985 - 1990. All rights reserved. These portions are
  300.           used under the terms of a license from Microsoft Corp. Some low-level
  301.           functions were written in assembly language and assembled by the
  302.           Microsoft MASM Macro Assembler (Version 6.00).
  303.  
  304.           These programs were written with care and have been tested on a number
  305.           of different systems.  I cannot, however, give any guarantee as to
  306.           their performance on a specific system, nor can I accept liability for
  307.           any actual or consequential loss resulting from their use. The
  308.           programs may only be used and/or copied in their original form.
  309.           Unauthorized modifications and/or the use of all or part of the
  310.           programs in other software, commercial or otherwise, are strictly
  311.           prohibited.
  312.  
  313.           The HD programs owe a lot of their value to suggestions and bug
  314.           reports (more of the former than the latter, fortunately) from
  315.           Registered users. They were originally written in response to a
  316.           "challenge" issued by Roedy Green on Bix, and their further
  317.           development has also been significantly influenced by his input. I
  318.           would also like to acknowledge the invaluable help of ltl, wlmoore,
  319.           and mike123 on Bix in beta-testing V5.xx of the program.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.           
  326.           
  327.                                           Page 4 
  328.            
  329.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  330.           _______________________________        _______________________________
  331.           
  332.           
  333.  
  334.                               GETTING STARTED - INSTALLATION
  335.                               ______________________________
  336.  
  337.           1) If you received the HDTEST package on a disk, use the DOS DISKCOPY
  338.           program to make a duplicate of the distribution disk, put the original
  339.           away in a safe place, and use the duplicate as your working disk.
  340.           Otherwise, use COPY to save a copy of the HDTEST distribution files
  341.           on a floppy disk, and put it away.
  342.  
  343.           2) HDTEST does not require any special installation procedure. You may
  344.           run HDCHEK and HDTEST from a working floppy disk or from any
  345.           subdirectory on your hard disk. If you wish to keep and run the
  346.           programs on your hard disk, you will probably find it most convenient
  347.           to COPY them to a subdirectory which is one of those included in your
  348.           DOS PATH (see your DOS Reference Manual). Only the two main .EXE files
  349.           (HDTEST.EXE and HDCHEK.EXE) need normally be kept on-line.
  350.           BOOTLOAD.COM is only used or needed to create a special boot disk, if
  351.           you find you need to use one.
  352.  
  353.           3) If you wish to be able to refer to this documentation on-line, you
  354.           should follow the instructions in the README.1ST file in the
  355.           distribution package to produce a .TXT file (without underlining) and
  356.           keep that file in your documentation subdirectory.
  357.  
  358.  
  359.                              GETTING STARTED - TESTING A DISK
  360.                              ________________________________
  361.  
  362.           This section gives step by step instructions for running HDCHEK and
  363.           HDTEST, under IBM or "generic" MS-DOS, on the C: drive of a standard
  364.           IBM PC, XT, AT, or 100% compatible. Subsequent sections of this
  365.           documentation go into much more detail about some of the program's
  366.           other features and options, and should help to explain and let you
  367.           deal with any problems which you may encounter. Note that you should
  368.           never attempt to run HDTEST under a multi-tasking or multi-user
  369.           _____                                                          
  370.           operating system, nor activate any "pop-up" program (e.g. SideKick)
  371.           while the program is running. HDTEST is also incompatible with
  372.           programs (such as TIMEPARK) which are designed to move the heads of a
  373.           hard disk to a safe (or new!) area of the disk after a period of
  374.           inactivity. Such programs should be disabled or unloaded before
  375.           running HDTEST.
  376.  
  377.           1) Make sure that you have current backups of all the files on drive
  378.           C:. This is particularly important when running the program for the
  379.           first time on a system.
  380.  
  381.           2) Run DOS's CHKDSK program on drive C: and correct any errors
  382.           reported by it before proceeding further.
  383.  
  384.           3) Make the drive and/or directory which contains HDCHEK.EXE and
  385.           HDTEST.EXE your current drive and/or directory.
  386.  
  387.  
  388.           
  389.           
  390.                                           Page 5 
  391.            
  392.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  393.           _______________________________        _______________________________
  394.           
  395.           
  396.           4) If you are not running HDTEST from your A: drive, insert a
  397.           formatted, non-write-protected floppy disk in drive A. HDTEST will
  398.           write an ASCII log file called HDTESTC0.LOG to the disk in drive A -
  399.           any other files on it will be undisturbed.
  400.  
  401.           5) Give the command: "HDCHEK C:". After a certain amount of disk
  402.           activity has taken place, and certainly within a minute or two, your
  403.           screen should look like one of the examples given in Appendix C. If
  404.           any errors are reported, DO NOT PROCEED until you have read the rest
  405.                                    ______________                             
  406.           of the documentation and/or are sure you know what is going on.
  407.  
  408.           6) If HDCHEK reported no errors, give the command "HDTEST C: A:".
  409.              ____________________________                                  
  410.           After some disk activity, the program will prompt for replies to three
  411.           questions - press <Return> in response to each prompt. The program
  412.           will report its progress to the screen and will record any problems
  413.           encountered in the log file on the floppy disk. Depending on the size
  414.           of your DOS partition and the access time of the disk, a complete run
  415.           of HDTEST (in its normal, "slow", mode) will take between 2 and 5
  416.           hours. Your intervention will only be required if a recovered bad
  417.           _____                                                            
  418.           cluster is found in a "hidden", "system", or write-protected file,
  419.           when you will be asked to approve remapping; otherwise, bad clusters
  420.           will be automatically remapped. HDTEST can be aborted at any time by
  421.           pressing <Esc> or <Ctrl-Break> and responding to the "Are you
  422.           sure...." prompt by pressing <Return>.
  423.  
  424.           7) If HDTEST finishes testing without finding any bad clusters, it
  425.           will simply record that fact and the finishing time in the log file
  426.           and return to the DOS prompt. Otherwise, when read/write testing has
  427.           been completed (or terminated, by entering <Esc> or <Ctrl-Break>), you
  428.           will be prompted for permission to complete the remapping process by
  429.           updating the disk FATs and Directories.  Pressing <Return> will allow
  430.           this to take place, and you will then be returned to the DOS prompt.
  431.  
  432.           8) N.B. If HDTEST reported and remapped any bad clusters and you are
  433.              ____                                                  ___        
  434.           using the DOS (3.3 and above) FASTOPEN utility, or any other
  435.           directory- or file-cacheing software, you should reboot your system
  436.           after running HDTEST and before proceeding with any other work on it.
  437.                                    ______                 ___                  
  438.  
  439.           9) In any event, if HDTEST reported and remapped some bad clusters,
  440.           you should read the section on "Dealing with bad clusters" later in
  441.           this documentation.
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.           
  454.           
  455.                                           Page 6 
  456.            
  457.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  458.           _______________________________        _______________________________
  459.           
  460.           
  461.                              HARDWARE & SOFTWARE REQUIREMENTS
  462.                              ________________________________
  463.  
  464.           HDTEST and HDCHEK make a number of assumptions about the environment
  465.           in which they are operating. They will, generally speaking, abort with
  466.           an informative error message if they find one of these assumptions to
  467.           be untrue! They require MS/PC-DOS 2.x or above and (for HDTEST) up to
  468.           about 320 Kb of free memory (the exact amount required depends on the
  469.           size and other characteristics of the device being tested) to run -
  470.           the presence of more memory may (slightly) increase HDTEST's speed
  471.           when testing devices with large cluster sizes. The device to be tested
  472.           must be usable as a normal DOS device - commands such as DIR, COPY,
  473.           and CHKDSK should be valid for it and for files and subdirectories on
  474.           it. It need not, however, be bootable. Only the DOS-accessible
  475.           partition(s) of a multi-operating-system disk can be tested, but all
  476.           the partitions of a disk that is divided into multiple DOS-accessible
  477.                                                                  ______________
  478.           partitions can be tested (one by one). This version of HDTEST fully
  479.           supports DOS 3.3 (and above) extended partitions, and will test them
  480.           as thoroughly as it does normal DOS partitions. It also allows BIOS-
  481.           level testing of the DOS-compatible "proprietary" partitions created
  482.           by SpeedStor and Disk Manager. HDTEST's support for other disk
  483.           partitioning software is provided only to the extent that DOS support
  484.           is provided by the producers of that software.
  485.  
  486.           If you wish to use HDTEST to test a new hard disk which is to be
  487.                                        ____                               
  488.           configured to support multiple operating systems, you should first
  489.           configure it as one or more DOS-accessible partitions, test it in that
  490.           configuration, and then reconfigure it as you intend to use it. If you
  491.                                   __                                            
  492.           have low-level disk formatting software which allows you to specify
  493.           bad sectors and/or tracks to be "locked out", you can use HDTEST's /G
  494.           option on the DOS partition(s) to produce a list of defects, which can
  495.           then be used in reformatting the disk. Note that HDTEST can only be
  496.                                                                       ____   
  497.           used as a test for areas of the disk that are to be devoted to other
  498.                     ____                                                      
  499.           operating systems - when you repartition the disk, any remapping
  500.           and/or marking of bad clusters which HDTEST may have done in the DOS
  501.           partition is lost, unless you use information given by the /G option
  502.           to redo the low-level format.
  503.                       _________        
  504.  
  505.           Ideally, for normal hard disks, the BIOS handler for interrupt 13
  506.           should be capable of handling (at least) normal disk reads and writes
  507.           (sub-functions 2 and 3) in a way that is compatible with that
  508.           documented for the XT hard disk adapter (and AT BIOS) in IBM's
  509.           technical documentation. This should be no problem for most disk
  510.           systems on IBM PCs and most compatibles.  HDTEST may, however, be
  511.           forced to use the (somewhat more limiting) DOS device interface when
  512.           used with non-bootable hard disks and/or with hard disks which require
  513.           special device drivers (other than those provided with the SpeedStor
  514.           and Disk Manager partitioning software) to be installed, and may also
  515.           be forced to use the DOS device interface when dealing with disks
  516.           partitioned by means other that the DOS 3.3 (and above) FDISK
  517.           utilities.
  518.  
  519.  
  520.           
  521.           
  522.                                           Page 7 
  523.            
  524.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  525.           _______________________________        _______________________________
  526.           
  527.           
  528.           Early V4.xx releases of HDCHEK and HDTEST would abort if run on small
  529.           (<= 10 Mb) hard disks which had been patched to use a cluster size
  530.           smaller than the DOS standard (and 16-bit FATs). This deficiency was
  531.           corrected in later V4.xx releases, but very small (less than 1024
  532.           clusters) partitions may still cause problems if 16-bit FATs are used
  533.           (there is no good reason why such partitions should use 16-bit FATs).
  534.  
  535.           By default, if run under DOS 3.0 or above on an IBM INT 13 compatible
  536.           hard disk, The HD programs attempt to locate and use the ROM BIOS INT
  537.           13 entry point, rather than the normal INT 13 vector (which DOS 3.x
  538.           and above intercepts and interferes with). By default, for machines
  539.           with 8088, 8086, 80188, 80186, or equivalent NEC CPUs the programs
  540.           assume that, if a ROM is present at absolute address C8000H, it
  541.                        ___________________                               
  542.           contains the hard disk BIOS and has initialization code starting at
  543.                                       ___                                    
  544.           offset 3. This assumption is true for all hard disks which "plug in"
  545.           to the IBM PC and XT. It may not be true for all clones which come
  546.           with hard disks installed, although it is likely to be true for most
  547.           of them. Also by default, the programs assume that the hard disk BIOS
  548.           in systems with 80286 or 80386 processors is in the "system" ROM at
  549.           absolute address F0000H, but make no more specific assumptions about
  550.                                             __                                
  551.           its exact location. Problems (up to and including system halts) may
  552.           occur if none of the special flags is set and your system is
  553.           configured in a way that is not consistent with these assumptions.
  554.           Such problems are almost guaranteed for PC or XT systems if the
  555.           initialization code does not start at offset 3 in the ROM. If you know
  556.           that your hard disk ROM is located somewhere other than at the default
  557.           segment address and/or does not obey the "rules", you can use the /H
  558.           flag to tell the programs where to look for it. Unless you know that
  559.           your system is particularly non-IBM-compatible, however, it is usually
  560.           worth trying to run the HD programs in their default mode first.
  561.           Problem hardware should respond to one of the approaches described in
  562.           the "Using the On-Disk Preboot" section of this documentation. The use
  563.           of all the command line flags is discussed in more detail below.
  564.  
  565.           Note that, since HDTEST remaps bad clusters to free space, there is
  566.           not much point in running it on a disk which has none (as shown by DIR
  567.           or CHKDSK), since the program will abort immediately if it finds a bad
  568.           cluster.  Unless you have a really flaky disk, however, you should not
  569.           need more than a couple of hundred Kb of free space to remap any
  570.           reasonably probable number of new bad clusters.
  571.  
  572.           This version of the HD programs does not require an ANSI console
  573.           driver (such as ANSI.SYS) to be loaded. The programs will, however,
  574.           continue to function correctly if such a driver is present.
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.           
  584.           
  585.                                           Page 8 
  586.            
  587.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  588.           _______________________________        _______________________________
  589.           
  590.           
  591.                                LIMITATIONS AND RESTRICTIONS
  592.                                ____________________________
  593.  
  594.           HDTEST still has a few (mainly theoretical) limitations, most of which
  595.           result from the way data is stored internally by the program. None of
  596.           them are "etched in stone", although some could only be avoided at the
  597.           cost of slowing down what is already (and necessarily) far from a fast
  598.           program. The known limitations are as follows:
  599.  
  600.           1) Maximum cluster size = 65,528 bytes. I do not believe that a DOS
  601.           disk can ever have clusters larger than 64 Kb, but my limit is a few
  602.           less than that and may, since sector and cluster sizes tend to run in
  603.           powers of 2, effectively limit cluster size to 32 Kb - this should be
  604.           enough for most people!.
  605.  
  606.           2) Because of certain limitations of the chips used to support direct
  607.           memory access (DMA, the method used to transfer data from disk to
  608.           memory and vice versa) in the IBM PC and most of its early clones and
  609.           compatibles, HDTEST may be unable to use available memory efficiently
  610.           when cluster sizes (and the buffers needed to hold them) are large.
  611.           This inefficiency can result in "Insufficient Memory" or "Memory
  612.           Allocation" errors, even on systems with more than the minimum 320 Kb
  613.           of free memory prescribed above. The only cure for this is to free up
  614.           (or buy!) more memory (remove RAMdisks, remove resident software,
  615.           etc.). Work is in progress on a version of HDTEST which can make more
  616.           extensive use of LIM 4.0 expanded memory for its buffers. Contact me
  617.           if you would like a preliminary copy of this version.
  618.  
  619.           3) The current version of HDTEST will run, in its default mode, on ATs
  620.           and most AT clones, but may not be able to detect corrected ECC errors
  621.           when run in default mode on some of the clones - a warning message
  622.           will be displayed when the program initializes itself if corrected ECC
  623.           errors are not being detected. Appropriate use of the extended form of
  624.           the /H flag or the /U flag, as described in the "Using the On-Disk
  625.           Preboot" section of this documentation, will allow detection of
  626.           corrected ECC errors on almost all hardware. The program will not
  627.                                                                         ___
  628.           detect corrected ECC errors when invoked with the /I flag (under DOS
  629.           3.0 or above) or with the /D flag.
  630.  
  631.           4) For reasons which are poorly understood (at least by the author!),
  632.           HDTEST runs very slowly on Epson Equity II systems, particularly when
  633.                       ____                                                     
  634.           used to test "plug-in" hard drives of the "Hardcard" or "Flashcard"
  635.           variety. For this hardware, the estimated run times given elsewhere in
  636.           the documentation need to be multiplied by about 2.5. There is some
  637.                                        __________          ___               
  638.           reason to think that this problem may be related to an excessively
  639.           "optimistic" interleave setting on (at least) some of these systems.
  640.  
  641.           5) HDTEST or HDCHEK will, by default, abort with an informative error
  642.           message if the program detects that the (80286 or better) CPU that it
  643.           is running on is not in "real" mode, since this normally means that a
  644.           (possibly multitasking) OS other than MS/PC-DOS is running and that
  645.           HDTEST cannot be guaranteed unchallenged access to the hardware. The
  646.           presence of LIM 4.0 expanded memory emulators such as QEMM-386 or
  647.           
  648.           
  649.                                           Page 9 
  650.            
  651.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  652.           _______________________________        _______________________________
  653.           
  654.           
  655.           386^Max, which use the 80386's "virtual 8086" mode to allow remapping
  656.           of extended memory into unoccupied space in the area between 640 Kb
  657.           and 1 Mb, will cause a similar abort, unless the driver is inactive
  658.           (turned "OFF"). This safety feature can be bypassed by the use of the
  659.           /V command line option (see below).
  660.  
  661.           6) HDCHEK and HDTEST will operate normally (except than the /U or /H
  662.           flags will sometimes be needed to use the low-level interface) on
  663.           (very large) hard disks with more than 1024 cylinders, provided that
  664.           the partition being tested does not begin or end above cylinder 1023.
  665.                                                     ______                     
  666.           HDTEST now supports the SpeedStor and Disk Manager extensions to INT
  667.           13, which allow access to cylinders beyond cylinder 1023. To use the
  668.           HD programs on partitions which span or start above cylinder 1024,
  669.           follow the instructions in the section of this document entitled:
  670.           "Using the HD programs with SpeedStor and Disk Manager". Otherwise, by
  671.           default, if the partition starts below and ends above track 1023,
  672.           HDCHEK will issue a warning and HDTEST will abort unless the /D flag
  673.           is used. If the partition starts above cylinder 1023, both HDCHEK and
  674.           HDTEST will, by default, abort.
  675.  
  676.  
  677.                                    COMMAND LINE OPTIONS
  678.                                    ____________________
  679.  
  680.           Always run HDCHEK on any new hardware/software configuration before
  681.           ______                                                             
  682.           you attempt to run HDTEST (at least the first time). The latter
  683.           program has been written as conservatively as possible, but it is not
  684.           possible to predict the behavior of every conceivable combination of
  685.           hardware and operating system when dealing with a program which
  686.           bypasses most of the controls which normally protect the user from
  687.           destroying his world. HDCHEK is invoked with the command line:
  688.  
  689.           HDCHEK device [optional parameters]
  690.  
  691.           "optional parameters" may include one or more of the following:
  692.  
  693.           [/A] [/Cn | /CQ] [/D | /Ex | /I | /U] [/Hnnnn[:nnnn]] [/M] [/V]
  694.  
  695.           "device" is the device to be tested (e.g. A:, B:, etc. - the colons
  696.           are permitted but not required). For versions of HDCHEK from V4.35,
  697.                             ___                                              
  698.           the spaces between the device identifier and the flags (and between
  699.           different flags) are optional - the command lines "HDCHEK C:/C2/D" and
  700.           "HDCHEK C: /C2 /D" are equivalent.
  701.  
  702.           The /A(T) flag is used to tell the HD program that it is being run on
  703.           an IBM AT. Setting the /A flag allows the programs to deal correctly
  704.           with a known bug in the IBM AT floppy disk controller BIOS when HDTEST
  705.           is used on 1.2 Mb "AT format" 5.25" floppy disks. If the /A flag is
  706.           set and the CPU is not an 80286 or better, you will be asked to
  707.           confirm that you wish to use AT defaults (HD BIOS at F0000H).
  708.  
  709.           N.B. the definition of the /A flag changed (slightly) at V4.71 - it
  710.           ___________________________________________________________________
  711.           need now only be used if you are testing a 1.2 Mb floppy disk on a
  712.           __________________________________________________________________
  713.           
  714.           
  715.                                          Page 10 
  716.            
  717.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  718.           _______________________________        _______________________________
  719.           
  720.           
  721.           "vanilla" IBM AT. It may still be used to change the default BIOS
  722.           _________________________________________________________________
  723.           segment to F0000H on a PC or XT class machine, but the use of the /H
  724.           ____________________________________________________________________
  725.           flag for this purpose is preferred.
  726.           ___________________________________
  727.  
  728.           The /C flag has two variants. It is used, immediately followed by a
  729.           single decimal digit ("n") in systems which do not support IBM's INT
  730.           11 "equipment determination" BIOS function (e.g. the Tandy 2000). The
  731.           parameter ("n") is the number of internal floppy drives attached to
  732.           the system, which would otherwise be determined by the program, using
  733.           INT 11. The second variant should be used on Compaq computers - here,
  734.           the flag is followed by a "Q", instead of a number. This variant
  735.           enables large device support (as for IBM DOS 4.00) under Compaq DOS
  736.           3.31.
  737.  
  738.           The /D(OS interrupts) flag forces HDCHEK to use the hardware-
  739.           independent DOS interrupt 25 for access to the target device. It is
  740.           usually not required, since the program is usually smart enough to
  741.           _______                                    _______                
  742.           recognize devices which have to be accessed this way (e.g. logical
  743.           disk partitions other than those created as DOS 3.3 (and above)
  744.           "Extended Devices", non-bootable hard disks, some removable-media hard
  745.           disks). If the /D flag is not used, the program will issue a warning
  746.                                     ___                                       
  747.           message if it finds it has to use the DOS interrupts.
  748.  
  749.           N.B. the definition of the /D flag changed at V4.00 - the new /I flag
  750.           _____________________________________________________________________
  751.           has the same effect as the old (pre-V4.00) /D flag. Only one of these
  752.           _____________________________________________________________________
  753.           flags may be present on the command line.
  754.           _________________________________________
  755.  
  756.           The /E(xtended INT 13) flag permits HDCHEK to recognize "proprietary"
  757.           SpeedStor or Disk Manager partitions and allows the use of the
  758.           "extended" INT 13 definitions which permit SpeedStor and Disk Manager
  759.           to support disks with more than 1024 cylinders. Use /ES to use
  760.           SpeedStor extensions and /ED for Disk Manager extensions. See the
  761.           "Using the HD programs with SpeedStor and Disk Manager" section of
  762.           this documentation for further details.
  763.  
  764.           The /I(nterrupt 13) flag has no effect under DOS 2.x.  Under DOS 3.0
  765.           or above, it forces HDCHEK to use the existing INT 13 vector (which it
  766.           always does under DOS 2.x), and prevents the program from trying to
  767.           determine the ROM BIOS entry point; the flag should be used if you
  768.           know that your system's fixed disk BIOS uses INT 13 but does not
  769.           follow IBM's "rules" or if the program crashes the system when invoked
  770.           without it.
  771.  
  772.           The /H(ex BIOS address) flag is normally used (with a single numeric
  773.           argument) to tell the HD programs that the ROM BIOS of the device
  774.           being tested is located at nnnn, which is interpreted as a Hexadecimal
  775.           segment address, rather than at C800, which is the default for PC and
  776.           XT class machines, or F000, which is the default for systems using a
  777.           80286 or better CPU. There must be no space between the H and the
  778.           number. The extended form of the /H flag (e.g. /HF000:80D5) forces the
  779.           HD programs to use the given address as the ROM BIOS INT 13 entry
  780.                                                ____________________________
  781.  
  782.           
  783.           
  784.                                          Page 11 
  785.            
  786.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  787.           _______________________________        _______________________________
  788.           
  789.           
  790.           point. Its use is documented in more detail in the "Using the On-Disk
  791.           _____                                                                
  792.           Preboot" section of this documentation.
  793.  
  794.           The /M(ulti-track read problem) flag forces HDCHEK to split up disk
  795.           accesses that would otherwise require the BIOS to read data from more
  796.           than one track in a single "bite". Its use is documented in more
  797.           detail in the "Using the On-Disk Preboot" section of this
  798.           documentation.
  799.  
  800.           The /U(se INT 68) flag forces the HD programs to use the existing INT
  801.           68 vector (which must have been set up to point to an appropriate
  802.           location!) instead of locating and using the INT 13 BIOS entry point.
  803.           The use of this flag is documented in more detail in the "Using the
  804.           On-Disk Preboot" section of this documentation.
  805.  
  806.           The /V(irtual mode) flag bypasses the code which prevents the HD
  807.           programs from working when the (80286 or better) CPU is not in "real
  808.           mode". It should only be used when the programs are being run under a
  809.                            ____                                                
  810.           single-tasking operating system which is using "virtual mode" only for
  811.                                                                         ____    
  812.           memory-mapping. Certain LIM 4.0 expanded memory emulators for 386
  813.           machines use the processor's virtual mode for this purpose. The two
  814.           most well-known examples of this type of software are QEMM-386 and
  815.           386^Max. The HD programs are "DESQview aware", and will abort if run
  816.           under DESQview, even if the /V flag is used. They will not be able to
  817.           protect you from the (probably disastrous) consequences of using the
  818.           /V flag to run them under other multi-tasking OSes (such as VM-386).
  819.  
  820.           After a short delay, during most of which the specified device will be
  821.           active, a description of the device's logical structure will be disp-
  822.           layed.  After a further delay, and more disk activity, a message will
  823.           be printed giving the number of files and subdirectories found on the
  824.           disk, and the program will exit back to DOS. Note that the total
  825.           number of files and subdirectories reported by HDCHEK will be greater
  826.           than the sum of the counts reported by CHKDSK. This is because HDCHEK
  827.           counts the "." and ".." entries in subdirectories and CHKDSK doesn't.
  828.  
  829.           Errors and/or problems encountered, if any, will be reported on in
  830.           some detail. A number of example screen displays and log files
  831.           produced by running HDCHEK (and HDTEST) on different systems will be
  832.           found in Appendix C at the end of this documentation. If HDCHEK tells
  833.           you that you have a bad 8088 chip, believe it - some early 8088s had a
  834.           bug which allowed them to be interrupted while changing their stack
  835.           frame*  - this is not benign, and can cause all sorts of rare,
  836.           otherwise almost inexplicable, problems. The only real cure is to
  837.  
  838.           _____________________________________________________________________
  839.  
  840.           * See "Chips in Transition", by Bob Smith. PC Tech J. 4:4 (Apr. 1986):
  841.                                                      __________                 
  842.           56-69. The code which the HD programs use to identify the CPU and
  843.           diagnose this problem is adapted from the CPUID program described in
  844.           this article and from code from subsequent, related, articles in that
  845.           (now defunct) magazine.
  846.           
  847.           
  848.                                          Page 12 
  849.            
  850.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  851.           _______________________________        _______________________________
  852.           
  853.           
  854.           replace the CPU (which is, fortunately, not a particularly expensive
  855.           proposition these days). If HDCHEK reports a discrepancy between the
  856.           two FATs, HDTEST will abort. The FIXFAT program (on the distribution
  857.           disk) may be able to correct this problem - see FIXFAT.DOC, also on
  858.           the distribution disk. 
  859.  
  860.           Always run the DOS CHKDSK program immediately before running HDTEST on
  861.           a disk. If CHKDSK reports any problems, its /F option (or other means)
  862.           should be used to correct them before HDTEST is run.
  863.                                          ____________________ 
  864.  
  865.  
  866.           HDTEST is invoked with the command line:
  867.  
  868.                HDTEST device1 [device2[:pathname]] [optional parameters]
  869.  
  870.           "optional parameters" may include one or more of the following:
  871.  
  872.           [/A] [/B] [/Cn | /CQ] [/D | /Ex | /I | /U] [/F] [/G[V]] [/Hnnnn[:nnnn]]
  873.           [/M] [/N] [/P] [/R[n]] [/Snnnnn] [/V] [/X] [/Yn] [/Z[n]]
  874.  
  875.           "device1" is the name of the device to be tested, as for HDCHEK.
  876.           "device2" (which, if present, must be different from "device1") is the
  877.                                         ____                                    
  878.           name of a device on which a log file is to be written. The device name
  879.           may be immediately followed by a file- or path-name for the log file.
  880.           If only a device name (with or without a colon) is specified for the
  881.           log file, a file called HDTESTdn.LOG will be written to the default
  882.           directory on the specified device. "d" in this file specification is
  883.           replaced by the single-character specifier of the device being tested,
  884.           while "n" is replaced by the lowest decimal digit which results in the
  885.           creation of a new file (previous log files will not normally be
  886.                         ___                               ___            
  887.           overwritten). If all ten possible log file names for this test device
  888.           have already been used, the program will prompt for a new name. If a
  889.           directory path (ending in a backslash (\)) is specified as device2,
  890.           HDTESTdn.LOG will be created in the specified directory. If a full
  891.           pathname is specified (not ending in a backslash), a file with that
  892.                                  ___                                         
  893.           pathname will be opened as the log file. In this case (only), any pre-
  894.           existing file of the same name will be overwritten. If "device2" is
  895.           not specified, errors are reported to the console terminal. The DOS
  896.           console redirection facility should not be used to redirect them
  897.                                               ___                         
  898.           elsewhere.
  899.  
  900.           For versions of HDTEST from V4.35, the spaces between the device
  901.           identifier and the flags (and between different flags) are optional -
  902.           the command lines "HDTEST C:/A/F" and "HDTEST C: /A /F" are
  903.           equivalent.
  904.  
  905.           The /A, /C, /D, /E, /H, /I, /M, /U, and /V flags have the same meaning
  906.           and effect that they do for HDCHEK. When used for HDTEST, the /D flag
  907.           forces the use of INT 25 to read from and INT 26 to write to the
  908.           target disk.
  909.  
  910.  
  911.           
  912.           
  913.                                          Page 13 
  914.            
  915.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  916.           _______________________________        _______________________________
  917.           
  918.           
  919.           The /B(oot/Partition sector test) flag forces the program to include
  920.           the boot/partition sector (track 0, head 0, sector 1) in the DOS area
  921.           for the purposes of read/write testing. The default action is only to
  922.           perform read and seek tests on this sector, even if read/write testing
  923.           of the DOS area is specified. Since the boot/partition sector is
  924.           effectively read-only under normal circumstances (it is only written
  925.                                                                        _______
  926.           to during low-level formatting, and by FDISK and other disk
  927.           __                                                         
  928.           partitioning programs), read/write testing is less vital than for the
  929.           rest of the disk. In addition, at least one hard disk controller (a
  930.           Western Digital board which allows a single disk to be addressed as
  931.           two "physical" devices) will not allow test patterns to be written to
  932.           this sector. Certain devices (chiefly RAMdisks) appear to DOS to be
  933.           hard disks but do not, in fact, possess boot/partition sectors. On
  934.           these devices, HDTEST will report check/test results on the
  935.           boot/partition sector while actually reading/writing the device's boot
  936.           sector - the latter sector will simply end up being checked/tested
  937.           twice under these circumstances.
  938.  
  939.           The /F(ast mode) flag causes the program to use only two test patterns
  940.           (all 1s and all 0s) for read/write testing. It is intended for use on
  941.           floppy disks and for "quick and dirty" testing of other devices.
  942.  
  943.           The /G(ive error details) flag causes the program to determine the
  944.           location of errors occurring during testing of the disk's data area at
  945.           the sector level (they are normally handled at the cluster level), and
  946.           to report on the physical location of all bad sectors found. The
  947.           report is written to the log device or file after all testing is
  948.                                                       ____________________
  949.           finished. By default, only an error code is given for each bad sector
  950.           ________                                                             
  951.           - if a V (for "verbose"!) is appended to the flag, the error code is
  952.           expanded to a report similar to that given for each bad cluster. This
  953.           flag is ineffective (and ignored) if HDTEST is using DOS interrupts,
  954.           either because the /D flag was set or because the program was not able
  955.           to access the disk at the BIOS level.
  956.  
  957.           The /N(o Query) flag disables the individual prompts for confirmation
  958.           which the program normally issues before remapping clusters which are
  959.           marked as "Reserved" or which are part of a file which is marked as
  960.           "System", "Hidden", or "Readonly".  The /N flag does not prevent the
  961.                                                                ___            
  962.           program from prompting for confirmation before updating the disk.
  963.  
  964.           The /P(rint) flag causes the log file to be directed to the PRN device
  965.           (normally LPT1), and overrides any "device2" specification.
  966.  
  967.           The /R(epeat)n flag causes HDTEST to go through n complete testing
  968.           cycles. Omitting n, or setting it to zero, causes HDTEST to run
  969.           continuously until terminated by pressing <Esc>). Instead of stopping
  970.           after completing the testing of allocated data clusters, the program
  971.           immediately starts again with the DOS area. Any bad clusters found and
  972.           flagged in the first pass should be reported as "already marked as
  973.           bad" in subsequent passes. The /R flag implicitly sets the /N flag and
  974.           disables the program's incremental testing functionality.
  975.  
  976.           
  977.           
  978.                                          Page 14 
  979.            
  980.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  981.           _______________________________        _______________________________
  982.           
  983.           
  984.           The /S(tart)nnnnn flag became largely obsolete with version 5.32 of
  985.           HDTEST. It causes HDTEST to start testing occupied clusters at cluster
  986.                                                     ________                    
  987.           number nnnnn (expressed as a decimal number). There must be no space
  988.                                        _______                                
  989.           between the "S" and the number. This option was mainly useful when a
  990.           previous run of HDTEST had been interrupted (by pressing <Esc> or
  991.           <Ctrl-C>), since it allowed you to start testing occupied clusters
  992.                                                            ________         
  993.           where you had left off. In order to be sure that data was not remapped
  994.           to a bad area, HDTEST always tested all empty clusters before starting
  995.                                 ______        ___                               
  996.           to test occupied clusters. For this reason, using the /S flag did not
  997.           result in a large time saving if the target disk was nearly empty, and
  998.           it made the most difference on a full, or nearly full, disk. From
  999.           version 5.32, HDTEST defaults to "picking up where it left off" after
  1000.           a run is interrupted. See the "Incremental Disk Testing" section for
  1001.           further details.
  1002.  
  1003.           The /Y(es, please remap)n flag causes HDTEST to remap up to n (a
  1004.           decimal number) bad clusters without prompting for confirmation. It is
  1005.           effective only if HDTEST is allowed to run to completion, and is
  1006.           intended to allow the program to be run unattended on multiple disks
  1007.           from a .BAT file. If more than n bad clusters are found or if the
  1008.           program is aborted (by pressing <Esc>), the normal prompt for
  1009.           confirmation is issued before any bad clusters are remapped. See
  1010.           "Running HDTEST from a .BAT file".
  1011.  
  1012.           The /X(clude bad clusters) flag causes HDTEST not to test clusters
  1013.                                                         ___                 
  1014.           that are already marked as bad by FORMAT or previous runs of HDTEST
  1015.           (the default is to test all clusters every time the program is run).
  1016.                                   ___                                         
  1017.           This saves some time when testing a disk with a substantial number of
  1018.           known defects. The marked clusters will be reported as bad but will
  1019.           not be retested. The /X flag overrides the /G flag for previously
  1020.           marked clusters - no bad sector report will appear for these clusters
  1021.           if both flags are used.
  1022.  
  1023.           The /Z(ero bad sectors)n flag controls how HDTEST deals with sectors
  1024.           that could not be read correctly (due to unrecoverable read errors)
  1025.           when it remaps bad clusters. Versions of HDTEST up to and including
  1026.           V4.10 (somewhat cavalierly) disregarded the remaining contents of the
  1027.           entire cluster if one or more sectors in it were unreadable, and
  1028.           remapped it to a cluster of NULLs. The default action is now to
  1029.           replace only the unreadable sector(s) with NULLs, transferring the
  1030.                                       _________                             
  1031.           remaining sectors intact to the remapped cluster. There are, however,
  1032.           two other options, which can be chosen by setting n to 0 or 2 (if n is
  1033.           omitted, 1, or any other number, the default action is taken). Setting
  1034.           n to 0 uses the old default (remaps the bad cluster to a cluster of
  1035.                           ___                                      _______   
  1036.           NULLs), while setting n to 2 goes to the other extreme and copies all
  1037.           data read (some of which is almost certainly invalid) to the remapped
  1038.           cluster. It is always safe and often advisable to use the /Z2 option
  1039.           provided that you do not try to use any non-ASCII files that have been
  1040.           ______________________________________________________________________
  1041.           remapped with unrecovered read errors and the /Z2 option. Remapped
  1042.           _________________________________________________________         
  1043.           ASCII files can be inspected with an editor and fixed up where
  1044.           necessary - non-ASCII files (e.g. .EXE, .COM, .WKS files) may appear
  1045.           to be undamaged (the program may run, the worksheet be readable, etc.)
  1046.           
  1047.           
  1048.                                          Page 15 
  1049.            
  1050.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1051.           _______________________________        _______________________________
  1052.           
  1053.           
  1054.           but they can still contain small changes which will cause trouble
  1055.           later, and they cannot easily be checked. The large "holes" which /Z
  1056.           options 0 and 1 leave in such files usually allows it to be much more
  1057.           obvious that they are defective!
  1058.  
  1059.  
  1060.                                    WHAT DOES HDTEST DO?
  1061.                                    ____________________
  1062.  
  1063.           The following discussion assumes that both any immediately previous
  1064.           run of HDTEST on the target device and the current run was and is
  1065.           allowed to run to completion. HDTEST's new (V5.32) incremental testing
  1066.           functionality is discussed in the "Incremental Disk Testing" section
  1067.           of this documentation.
  1068.  
  1069.           After displaying its copyright message, HDTEST reads the FATs and
  1070.           scans the root directory and all subdirectory trees of the specified
  1071.           device before initiating a short dialogue. All questions are of the
  1072.           "Yes/No" type and should be answered by typing "Y" or "N" (case does
  1073.           not matter) and pressing the <Return> key.  Pressing the <Return> key
  1074.           alone is equivalent to giving the default response (which appears in
  1075.           square brackets at the end of each prompt).  HDTEST then proceeds to
  1076.           test the specified device. By default, the DOS area (boot sector,
  1077.           FATs, and root directory) is not subjected to Read/Write testing,
  1078.           since failures in this area usually make themselves apparent fairly
  1079.           rapidly. The user can, however, choose to run these tests on the DOS
  1080.           area too, or to limit testing to read and seek tests only over the
  1081.           whole partition.
  1082.  
  1083.           In its reports to the screen, HDTEST uses the convention that read-
  1084.           only testing is "Checking" while read/write testing is "Testing" - it
  1085.           always "checks" the boot/partition sector and the rest of the DOS
  1086.           area, but only "tests" them if requested to do so.
  1087.  
  1088.           In "checking" or "testing" a block (sector or cluster), HDTEST first
  1089.           reads it (retrying, if necessary, up to five times) and then does the
  1090.           longest possible seek away from it before attempting to read it again.
  1091.           "Checking" is complete at this point. "Testing" continues with the
  1092.           program sequentially writing 20 (or 2, for "fast mode") different bit
  1093.           patterns to the block and checking that each one can be read
  1094.           correctly, before rewriting the original contents of the block (and
  1095.           reading it again to ensure that it has been restored correctly).
  1096.           Errors that occur at any point in this process are reported and (if
  1097.           the block is in the data area - errors in the DOS area are always
  1098.           treated as fatal) the block is remapped. If an error is detected in a
  1099.           "Reserved" cluster or in one that is part of a file which is marked as
  1100.           "System", "Hidden", or "Readonly", the user is normally asked for
  1101.           confirmation before the cluster is remapped, otherwise it is assumed
  1102.           that remapping is desired.
  1103.  
  1104.           HDTEST keeps a copy of the FAT and a map of the device's directory
  1105.           structure in memory. A bad cluster is remapped by transferring its
  1106.           contents to a free cluster and (if the bad cluster was in use)
  1107.           
  1108.           
  1109.                                          Page 16 
  1110.            
  1111.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1112.           _______________________________        _______________________________
  1113.           
  1114.           
  1115.           changing all necessary FAT and directory entries in memory so that the
  1116.           pointer chain which maintains the structure of the affected file or
  1117.           subdirectory remains valid. The bad cluster's FAT entry is then
  1118.           altered to identify it as bad to DOS. The device's FATs and
  1119.                                                     ________         
  1120.           directories are not altered until the whole device has been scanned,
  1121.           and then only after the user has confirmed that it is OK to proceed.
  1122.           This means that a power failure and/or an inadvertent power-off which
  1123.           occurs while the program is running will cause the loss of, at most,
  1124.           one cluster of data and of no FAT or root directory information
  1125.           (unless you are very unlucky and it happens after you have confirmed
  1126.                           ____                                                
  1127.           that you want a damaged data area to be remapped and while this is
  1128.           being done). If a power failure and/or power-off occurs while a
  1129.           cluster which contains the directory information of a subdirectory is
  1130.           being tested, part or all of that subdirectory will probably become
  1131.           inaccessible to DOS, although the data in it will remain on the disk
  1132.           and be potentially recoverable with the aid of (e.g.) the Norton
  1133.           Utilities (TM).
  1134.  
  1135.           You can safely interrupt the testing process part way through (by
  1136.           pressing the <Esc> or <Ctrl-Break> key) with no risk of leaving a
  1137.           partially updated FAT or directory. If you do interrupt the program in
  1138.           this way, you will be given the option of updating the disk, so that
  1139.           bad clusters which were detected before it was interrupted can be
  1140.           remapped. The program will also create a file (HDTESTED.MP0) in the
  1141.           root directory of the target disk which a subsequent run of HDTEST can
  1142.           read to identify clusters that have already been tested. See the
  1143.           "Incremental Disk Testing" section of this documentation for more
  1144.           discussion of this area.
  1145.  
  1146.           Errors which occur in the program's initialization phase cause it to
  1147.           abort with an error message and (sometimes) a hexadecimal error code.
  1148.           The meaning of the error code is context-dependent and it is useful
  1149.           only to technical support personnel (i.e. the author!). Errors
  1150.           detected during read-write testing only cause the program to abort if
  1151.           they occur during testing of the DOS area, or if remapping is
  1152.           impossible (only likely to happen if the disk is full). In any event,
  1153.           a description of the error is written to the log file (if any) and/or
  1154.           to the screen. This specifies the cluster or (for the DOS area) sector
  1155.           number and the name of the affected file (if any), and defines the
  1156.           type(s) of error which occurred. Appendix B contains a discussion of
  1157.           some of the more technical aspects of data storage on disks (floppy
  1158.           and hard), and includes more information about some of the possible
  1159.           errors that may be encountered.
  1160.  
  1161.           HDTEST takes a very long time to run to completion because of the
  1162.                          ____                                              
  1163.           large number of reads and writes it does for each cluster. A typical
  1164.           time for full testing ("slow" mode) of an XT disk (10 Mb) would be 2
  1165.           hrs; full disk testing on a 30 Mb Enhanced AT takes at least 4 hrs.
  1166.           Note also that using the /D or /G flags will substantially slow down
  1167.           the testing of disks with significant numbers of bad spots. Using the
  1168.           /X flag as well will allow the physical location of new defects to be
  1169.  
  1170.           
  1171.           
  1172.                                          Page 17 
  1173.            
  1174.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1175.           _______________________________        _______________________________
  1176.           
  1177.           
  1178.           reported without requiring that known bad areas be exhaustively
  1179.           retested.
  1180.  
  1181.  
  1182.                                  INCREMENTAL DISK TESTING
  1183.                                  ________________________
  1184.  
  1185.           In response to a considerable number of requests, mainly from users
  1186.           with very large disks and/or partitions, on which HDTEST took a very
  1187.           long time to run to completion, the program has been revised to allow
  1188.           true "incremental" testing of the data area. When a run of HDTEST is
  1189.           interrupted by the user pressing <Esc> or <Ctrl-Break> during testing
  1190.           of the data area, the program writes a special file (HDTESTED.MP0) in
  1191.           the root directory of the target disk before exiting. This file
  1192.           contains a bitmap of the data area of the disk, with set bits
  1193.           indicating clusters that have been tested, and a six-byte header which
  1194.           a subsequent run of HDTEST can use to ensure that the file has not
  1195.           been corrupted. After HDTEST writes the file, the program gives it the
  1196.           "READ ONLY" attribute, so that it will not be accidentally deleted or
  1197.           modified. If a subsequent invocation of HDTEST finds HDTESTED.MP0 in
  1198.           the root directory of the target disk, the program will ask if you
  1199.           want to use the information in the file to allow it effectively to
  1200.           start where the previous run left off. If the file is less than 14
  1201.           days old, the default answer to this query is "Y"; if the file is
  1202.           older, the default answer is "N". If the new invocation of HDTEST runs
  1203.           to completion, HDTESTED.MP0 will be deleted; if the new invocation is
  1204.           again interrupted, the file will be updated with bits set for any
  1205.           additional tested clusters. Note that every run of HDTEST will check
  1206.           or test the entire DOS area of the disk. Only the data area is
  1207.           potentially subject to incremental testing. Note also that it does not
  1208.           matter if files are written or deleted between "incremental" runs of
  1209.           HDTEST. Newly freed clusters will be tested before any occupied
  1210.                   _____                                                  
  1211.           clusters, even if the previous run had included all (then) free
  1212.           clusters, and previously free clusters now included in files will be
  1213.           skipped, but the program will not become confused or miss any untested
  1214.           clusters because the contents of the disk may have changed.
  1215.  
  1216.  
  1217.                                 USING THE ON-DISK PRE-BOOT
  1218.                                 __________________________
  1219.  
  1220.           All "normal" PCs and almost all clones capable of running IBM PC-DOS
  1221.           (rather than "generic" MS-DOS) should also run the HD programs with no
  1222.           problems, and should allow them to locate and use the ROM BIOS INT 13
  1223.           entry point with no help from the user. Less compatible systems have
  1224.           presented more problems in the past, but current Registered versions
  1225.           of HDTEST are distributed on a disk whose boot sector has been
  1226.           modified to allow identification and use of the "real" entry point on
  1227.           almost any MS-DOS-compatible hardware. This modified boot sector will
  1228.                                                                            ____
  1229.           be correctly duplicated if you back your distribution disk up by using
  1230.           the DOS "DISKCOPY" command - it will not be copied by a "COPY *.*"
  1231.                                                ___                          
  1232.           command. This initially presented a significant potential problem for
  1233.           users of the Shareware version of the program, but the distribution
  1234.           packages of all current releases of HDTEST also contain a program
  1235.           
  1236.           
  1237.                                          Page 18 
  1238.            
  1239.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1240.           _______________________________        _______________________________
  1241.           
  1242.           
  1243.           (BOOTLOAD.COM) which will modify the boot sector of any removable
  1244.                                                               ___          
  1245.           disk, allowing you to create a special pre-boot on the media of your
  1246.           choice. Further documentation for this program is to be found (as
  1247.           BOOTLOAD.DOC) in the distribution package.
  1248.  
  1249.           To use the special pre-boot, first insert your copy of the HDTEST
  1250.           distribution disk in the boot drive (normally drive A), then (re)boot
  1251.           your system as you normally do (either by switching it on or by
  1252.           pressing the <Ctrl>-<Alt>-<Del> combination or its equivalent for your
  1253.           hardware). After performing its self-test, the system's BIOS will load
  1254.           and pass control to the code on the boot sector of the floppy. On a
  1255.           normally FORMATTed floppy disk, this code attempts to locate the MS-
  1256.           DOS system files at the beginning of the disk's root directory and to
  1257.           load and execute them. The HDTEST boot disk will not load DOS (even if
  1258.           you SYS the disk) - it simply reads and reports on the contents of the
  1259.           INT 13 vector (which DOS has not yet had a chance to tamper with,
  1260.           since it has not been loaded) and conditionally transfers the vector
  1261.           to the INT 68 location. The INT 68 location is normally unused in MS-
  1262.           DOS systems - it is defined that way by IBM - and is usually loaded
  1263.           either with zeroes or with a pointer to some "do-nothing" code by the
  1264.           BIOS bootstrap. The HD programs use it for the "real" INT 13 vector,
  1265.           normally saving the original contents of the location on entry and
  1266.           restoring them on exit. This behavior is modified by specifying the /U
  1267.           switch on the command line. The HDTEST boot sector code will only
  1268.           transfer the "real" INT 13 BIOS entry point to the INT 68 location if
  1269.           the latter contains either zeroes or the same vector as INT 69. In the
  1270.                               ______        __                                  
  1271.           latter case (since there is no point in having two "real" interrupt
  1272.           vectors pointing at the same place), it is assumed that both are
  1273.           pointing at "do-nothing" code. If the INT 68 vector is neither 0:0 nor
  1274.                                                                  _______     ___
  1275.           the same as the INT 69 vector, the preboot code will leave it alone
  1276.           and report that the INT 13 vector was not transferred, otherwise it
  1277.           will confirm that the transfer has taken place - in any event, you
  1278.           will be given an opportunity to write down the vector and can then
  1279.           remove the disk and press a key to allow the boot process to complete.
  1280.           If you need to boot from a floppy disk, for some reason, a new,
  1281.           bootable, disk can be inserted before you press the key to continue.
  1282.  
  1283.           If the preboot reported that the INT 13 vector was successfully
  1284.           transferred, you should simply specify the /U flag on the HDTEST or
  1285.           HDCHEK command line, in addition to the "short" form of the /H flag
  1286.                                ______________                                
  1287.           (if the BIOS ROM is at an unusual location for the class of machine).
  1288.           The requirement for the /H flag with unusual hardware allows the
  1289.           program to do some additional "reasonableness checking". Unless some
  1290.           other software interferes with it, the INT 68 vector will then
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.           
  1300.           
  1301.                                          Page 19 
  1302.            
  1303.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1304.           _______________________________        _______________________________
  1305.           
  1306.           
  1307.           continue to be set up correctly for use by the HD programs until the
  1308.           system is switched off or rebooted.
  1309.  
  1310.           If the preboot was not able to transfer the vector, or if you know
  1311.           that a device driver or resident program loaded by your DOS uses INT
  1312.           68, you should invoke the HD programs with the "long" form of the /H
  1313.           flag, specifying the full address displayed by the preboot. No error
  1314.           checking is attempted in this case - if you mistype the address, the
  1315.           first time the program attempts to access the disk, it will jump to a
  1316.           (effectively) random location in ROM, with potentially disastrous
  1317.           results. If it is feasible, use of the pre-boot disk and the /U flag
  1318.           is preferable (in terms of safety, if for no other reason) to that of
  1319.           the "long" form of /H.
  1320.  
  1321.           The following example may help to clarify matters. You have a clone
  1322.           system with a BIOS ROM location that is non-standard. The HDTEST boot
  1323.           disk reports that the INT 13 entry point is at E000:13AC, and that the
  1324.           vector has been successfully transferred. You may now run HDTEST with
  1325.           the command line:
  1326.  
  1327.           HDTEST C: A: /U /HE000
  1328.                             ____
  1329.  
  1330.           You may also, now or later, with or without prior use of the pre-boot,
  1331.                                       _______________                           
  1332.           run HDTEST with the command line:
  1333.  
  1334.           HDTEST C: A: /HE000:13AC
  1335.                          _________
  1336.  
  1337.           Note that the /H flag is not needed with the /U flag if the segment
  1338.                                    ___                                       
  1339.           address of the hard disk BIOS is the usual value for the system type
  1340.                                                            ___________________
  1341.           (as determined by the processor). For a system based on an 8088, 8086,
  1342.           80188, or 80186 processor, this "usual" value is C800. For all other
  1343.           systems, the "usual" value is F000.
  1344.  
  1345.           It is important to note that the /Ex and /U (or /H) command line
  1346.           options are incompatible, since the former forces the HD programs to
  1347.           use the third-party INT 13 driver entry point, rather than the BIOS
  1348.           entry point. If you are unfortunate enough to have a system which has
  1349.           both a non-standard BIOS location and one or more partitions
  1350.           ____                              ___                       
  1351.           controlled by SpeedStor or Disk Manager, you will need to use the /U
  1352.           or /H flags when testing the "vanilla" DOS partition(s) and the
  1353.           appropriate form of the /Ex flag when testing the "third-party"
  1354.           partitions.
  1355.  
  1356.           One further problem may be encountered - certain hard disk BIOSes do
  1357.           not exactly comply with IBM standards in dealing with disk accesses
  1358.           that cross track boundaries, and will produce frequent errors when
  1359.           such accesses are attempted. It was this "multi-track read" problem
  1360.           which resulted in a number of previously apparently 99.99% IBM-
  1361.           compatible systems failing to run IBM PC-DOS 3.3 (which was the first
  1362.           version of DOS actually to attempt such accesses). IBM issued a "fix"
  1363.           for this problem, in the form of a program which, when run on the
  1364.           "bad" system, creates a device driver which protects the BIOS from
  1365.           
  1366.           
  1367.                                          Page 20 
  1368.            
  1369.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1370.           _______________________________        _______________________________
  1371.           
  1372.           
  1373.           being asked to do something that it can't. This device driver does its
  1374.           job by intercepting INT 13, and will, of course, do nothing to help
  1375.           the HD programs if they are bypassing that interrupt. Use the /M flag
  1376.           with the HD programs if you have a system on which PC-DOS 3.3 or above
  1377.           will not run without being "fixed" as described. It forces the
  1378.           programs to split up the multi-track accesses into manageable chunks -
  1379.           this can be expected to cause a substantial slowing of the programs'
  1380.           operation.
  1381.  
  1382.  
  1383.                    USING THE HD PROGRAMS WITH SPEEDSTOR AND DISK MANAGER
  1384.                    _____________________________________________________
  1385.  
  1386.           The HD programs will operate without problems under DOS 2.x through
  1387.           4.01 on almost all hard disks with up to 1024 cylinders, as well
  1388.           (usually) as on larger ESDI disks which use "sector translation" to
  1389.           appear to have less than this magic number of cylinders. An increasing
  1390.           number of disks now coming to market have more than this number of
  1391.           cylinders but do not have the ability to perform "sector translation".
  1392.           If their full extent is to be usable under DOS, these disks must be
  1393.           partitioned with the use of special non-DOS utilities (the two major
  1394.           contenders are SpeedStor and OnTrack's Disk Manager), and access to
  1395.           (at least) the "high" partitions requires a special driver to be
  1396.           loaded in CONFIG.SYS. In addition, many of those who used such third-
  1397.           party drivers to support partitions greater than 32 MB in extent under
  1398.           DOS versions prior to 4.0 on intermediate sized disks continue to use
  1399.           them for this purpose.
  1400.  
  1401.           Versions of the HD programs prior to V5.00 were only able to handle
  1402.           "third-party" partitions at the DOS level. The current version
  1403.           understands the partitioning schemes used by the SpeedStor (SS) and
  1404.           Disk Manager (DM) software, and can, if necessary, use the special
  1405.           drivers' INT 13 extensions to test the proprietary partitions as
  1406.           thoroughly as it does "normal" DOS partitions. In addition to using
  1407.           the /Ex command line flag (q.v.), it is necessary to load a special
  1408.           device driver, HDTESTDD.BIN, which is supplied with the HDTEST
  1409.           package, in CONFIG.SYS. The line: DEVICE=[drive:][path\]HDTESTDD.BIN
  1410.           should be added to CONFIG.SYS immediately after the line which loads
  1411.                                         ______________________________________
  1412.           the partitioning software's driver. The HDTESTDD driver takes up only
  1413.           __________________________________                                   
  1414.           128 bytes of memory, and the command to load it may be made a
  1415.           permanent part of your CONFIG.SYS - the driver does not intercept or
  1416.           chain into any interrupts and will have no effect on the normal
  1417.           functioning of your system. It does, however, allow the HD programs to
  1418.           locate and use the partitioning driver's INT 13 entry point, which
  1419.           they may not be able to obtain in any other way.
  1420.  
  1421.           Either SS or DM can be used to set up and format disks with one or
  1422.           (under DOS 3.3 and above) more normal DOS partitions, as well as, or
  1423.           sometimes instead of, one or more of their own proprietary ones. The
  1424.           /Ex command line switch should only be used for the proprietary
  1425.                                          ____                            
  1426.           partitions - its use with normal DOS ones will slow the programs down
  1427.           somewhat and may make HDTEST less sensitive to minor problems.
  1428.  
  1429.           
  1430.           
  1431.                                          Page 21 
  1432.            
  1433.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1434.           _______________________________        _______________________________
  1435.           
  1436.           
  1437.           N.B. The SS or DM driver (SSTOR.SYS or DMDRVR.BIN) should always be
  1438.           ____                                                               
  1439.           the first block device driver in CONFIG.SYS. Drivers for other block
  1440.               _____                                                           
  1441.           devices such as RAMdisks, external floppy drives, tape drives, or CD-
  1442.           ROM drives should always follow both it and the HDTESTDD.BIN driver.
  1443.           The HD programs assume that the device names of any SS or DM
  1444.           partitions follow in alphabetical order immediately after those of any
  1445.                                                   _________________             
  1446.           "normal" DOS floppy and hard disk partitions present. If any other
  1447.           devices are interposed, the HD programs will not be able to operate at
  1448.           anything but the DOS interrupt level.
  1449.  
  1450.           Reports that earlier versions of the HD programs could cause potential
  1451.           or actual data loss if run on disks with more than 1024 tracks appear
  1452.           to have resulted from attempts to use them on improperly partitioned
  1453.                                                         ______________________
  1454.           drives. Problems with ESDI disks using sector translation were,
  1455.           however, eventually tracked down to a bug in the HD programs'
  1456.           initialization code which was causing the incorrect interpretation of
  1457.           partition table data in extended partitions, while problems with large
  1458.           disks using third-party partitioning drivers seem to have resulted
  1459.           from the incorrect designation of a partition ending above cylinder
  1460.           1023 as a DOS partition - a mistake which would have resulted in major
  1461.           problems from any attempt to access the area above track 1023. There
  1462.                         ___                                                   
  1463.           now appears to be no evidence that earlier versions of HDTEST could
  1464.           damage data on properly partitioned disks of any size.
  1465.                          ____________________                   
  1466.  
  1467.  
  1468.                            SPECIAL CONSIDERATIONS WITH SPEEDSTOR
  1469.                            _____________________________________
  1470.  
  1471.           SpeedStor V6.0 and above uses a rather complex partition tree
  1472.           structure to support more than the 8 partitions per disk allowed by
  1473.           earlier versions of the software. SpeedStor also always names the
  1474.           partitions which it controls in alphabetical order as they appear on
  1475.           the physical disk, whether or not this is the order in which pointers
  1476.           to them are found while traversing the directory tree. There are,
  1477.           consequently, some circumstances under which the HD programs and
  1478.           SpeedStor may "disagree" about the order in which its partitions are
  1479.           named. This will generally cause HDTEST to "fall back" to DOS
  1480.           interrupt level when testing the disputed partitions. This problem
  1481.           will generally only be encountered when the "owner" of a partition is
  1482.           changed after a disk has been partitioned, and/or one or more
  1483.           partitions have been deleted and a larger number have been added in
  1484.           the middle of a disk. There is no "quick fix" for this problem. The
  1485.           best solution is to back up all the partitions on the "offending"
  1486.           device, and delete and recreate them "from scratch". This will ensure
  1487.           that SpeedStor and HDTEST agree on the order in which the partitions
  1488.           are named.
  1489.  
  1490.  
  1491.                                   DEALING WITH BAD CLUSTERS
  1492.                                   _________________________
  1493.  
  1494.           It is not unusual for a new hard disk to have a small, constant,
  1495.                                                           _____  ________ 
  1496.           number of bad clusters. IBM's quality control standards allow, for
  1497.           example, 5% of the surface area of a disk to be bad (!). These pre-
  1498.           
  1499.           
  1500.                                          Page 22 
  1501.            
  1502.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1503.           _______________________________        _______________________________
  1504.           
  1505.           
  1506.           existing bad clusters, which correspond to imperfections in the
  1507.           magnetic coating on the disk, will normally be detected by the
  1508.           manufacturer's routine tests. Their locations will appear on the
  1509.           "badspot list", which comes with the drive, and the whole track which
  1510.           contains the defect will be marked as bad during low-level formatting.
  1511.           The marked bad sectors will be detected by the DOS FORMAT program,
  1512.           which will mark the relevant clusters as bad, and HDTEST will report
  1513.           them as "already marked as bad". This should not be regarded as
  1514.           evidence of any real problem with the disk, although some suppliers
  1515.           (not including IBM) will replace such disks under warranty if pressed
  1516.            ___                                                                 
  1517.           to do so. It is also not unusual for a disk to develop a few more
  1518.                                                                    ___     
  1519.           defects as it ages. When these do develop, they should also
  1520.           subsequently be constant in size and position, and will be reported as
  1521.           "already marked as bad" by HDTEST on runs subsequent to that during
  1522.           which they are first found. The occasional appearance (and subsequent
  1523.                                           __________                           
  1524.           persistence) of a new bad cluster is, therefore, not necessarily
  1525.           evidence of serious trouble developing.  However, if more than one or
  1526.           two new bad clusters are reported by HDTEST, and especially if two
  1527.           consecutive runs (or passes, if the /R flag is set) of HDTEST report
  1528.           different bad clusters, there is a good chance that the hard disk or
  1529.           _________                                                           
  1530.           controller is developing a serious problem - the disk should be backed
  1531.           up immediately and the disk and/or controller sent for repair at the
  1532.           earliest opportunity.
  1533.  
  1534.           New bad clusters in the data area are automatically mapped out by
  1535.           HDTEST, and no further action is necessary. Bad sectors in the DOS
  1536.           area can be handled in two ways:
  1537.  
  1538.           1) If you are able to do a low-level format on your hard disk (most
  1539.                                      _________                               
  1540.           makers of "add-on" hard disks supply a method of doing this, either in
  1541.           the form of a short program, or by giving instructions for running a
  1542.           program in the ROM BIOS from DEBUG), back up the entire hard disk
  1543.                                                            ______          
  1544.           (including any non-DOS partitions), run the low-level format, use
  1545.           FDISK to repartition the disk, and then run the DOS FORMAT program. If
  1546.           HDTEST now reports no errors in the DOS area you can restore all your
  1547.           files and continue to use the disk. You should, however, use HDTEST to
  1548.           test (at least) the DOS area fairly frequently for a month or so to be
  1549.           sure that the problems are not going to recur.
  1550.  
  1551.           2) If you do not have the means to do a low-level format, or if you
  1552.           follow the above instructions and HDTEST continues to report errors in
  1553.           the DOS area, your only other choice is to back up the DOS partition,
  1554.           reconfigure the disk with FDISK so that the new DOS partition starts
  1555.           above the bad area, reFORMAT it, and restore all of the old files to
  1556.           the new DOS partition (which will unavoidably be a little smaller than
  1557.           the old).
  1558.  
  1559.           If the hard disk's boot/partition sector (track 0, Head 0, sector 1)
  1560.           becomes bad, the disk is useless and must be replaced. This sector is
  1561.           only subjected to read/write testing if the /B flag is specified on
  1562.                             __________                                       
  1563.           the command line, so any reported errors (in sector -1) during normal
  1564.                                                               __               
  1565.           testing represent a problem reading the sector and are likely to be
  1566.                                       _______                                
  1567.           
  1568.           
  1569.                                          Page 23 
  1570.            
  1571.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1572.           _______________________________        _______________________________
  1573.           
  1574.           
  1575.           significant. Problems encountered during read/write testing of this
  1576.           sector do not always indicate a significant problem - certain
  1577.                     ___                                                
  1578.           controller cards may not allow test patterns to be written to it,
  1579.           resulting in a report of multiple errors on read/write testing.
  1580.           Consequently, if multiple errors are reported on read/write testing of
  1581.           the boot/partition sector, but read-only testing proceeds without
  1582.           problems and the rest of the disk seems to be OK, there is probably no
  1583.           cause for concern.
  1584.  
  1585.  
  1586.                               RUNNING HDTEST FROM A .BAT FILE
  1587.                               _______________________________
  1588.  
  1589.           Versions of HDTEST from V4.75 can be run from a .BAT file (e.g. for
  1590.           unattended testing of multiple disks) without the user losing the
  1591.           ability to "escape" cleanly from the program. The /Y flag also allows
  1592.           the user to specify a maximum number of new bad clusters for each disk
  1593.           to be remapped "automatically", so that the .BAT file will normally
  1594.           just keep going but will pause and wait for input if something
  1595.           terrible seems to have happened to a disk. In order to run HDTEST from
  1596.           a .BAT file, it is necessary to prepare both the .BAT file with your
  1597.                                                   ____                        
  1598.           usual HDTEST command lines, generally including the /Y and /N flags,
  1599.           and a second ASCII file containing the answers to HDTEST's initial
  1600.           ___                                                               
  1601.           questions, one per line. DOS's input redirection ("<") command is used
  1602.           to "feed" these answers to HDTEST. If the "answer" file is called
  1603.           (e.g.) ANSWERS.TXT, each line in the .BAT file will look like:
  1604.  
  1605.               HDTEST dev1 dev2 /opt1 /opt2 <ANSWERS.TXT
  1606.                                            ____________
  1607.  
  1608.           If you do not wish to read/write test the DOS area of the disk, your
  1609.           answer file can consist of three blank lines. If you do wish to
  1610.                                                                __        
  1611.           read/write test the DOS area, the first line of the answer file can be
  1612.           blank, the next two must start with a "y" and the fourth can be blank.
  1613.                           ___                                                   
  1614.           In order to allow HDTEST to be interrupted from the keyboard, if
  1615.           necessary, the program terminates input redirection before starting
  1616.           testing the disk, so anything in the answer file after the answers to
  1617.                                                            _____               
  1618.           HDTEST's initial questions will be ignored.
  1619.  
  1620.           On exit, HDTEST now returns a meaningful ERRORLEVEL, which can be
  1621.           tested from a .BAT file by means of DOS's "IF ERRORLEVEL" syntax.
  1622.           Versions of the program prior to V4.81 returned an ERRORLEVEL of 1 on
  1623.           aborts and 0 otherwise - HDCHEK still does this. The current version
  1624.           of HDTEST normally returns an ERRORLEVEL equal to the number of new
  1625.           bad clusters found. On aborts it returns 254, and, if deliberately
  1626.           terminated by the user (either by answering "N" to the last question
  1627.           in the introductory dialogue or by pressing and confirming <Esc>
  1628.           during testing), it returns 255.
  1629.  
  1630.           You should not normally use HDTEST's incremental testing functionality
  1631.           (see "Incremental Disk Testing" section) when running the program from
  1632.           a .BAT file - if HDTEST finds HDTESTED.MP0 in the root directory while
  1633.           being run from a .BAT file, it will not ask whether or not to use the
  1634.           information in it. It will simply use it if the file is less than 14
  1635.           
  1636.           
  1637.                                          Page 24 
  1638.            
  1639.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1640.           _______________________________        _______________________________
  1641.           
  1642.           
  1643.           days old, and not otherwise (these would be the default responses if
  1644.           the program prompted for them).
  1645.  
  1646.           Note that this application of HDTEST is really intended for advanced
  1647.           users, and I am aware that this description is somewhat cursory - more
  1648.           help in using it can, if necessary, be obtained directly from me.
  1649.  
  1650.  
  1651.                             BUGS AND OTHER UNPLEASANT SUBJECTS
  1652.                             __________________________________
  1653.  
  1654.           Although, like all programmers, I like to think that my product is
  1655.           perfect, it is possible that there are a few bugs lurking in the
  1656.           depths of the program, and likely that some combination of software
  1657.           and hardware exists which HDTEST cannot figure out and/or cope with.
  1658.           If you think you have found a bug and/or if you cannot get either of
  1659.           the programs to work on your system, do the following:
  1660.  
  1661.           1) Reread this documentation! Make sure that you are doing exactly
  1662.           what the documentation says to do. Make sure (if you are testing a
  1663.           drive with removable media) that the media is not write-protected.
  1664.  
  1665.           2) Boot your system from a "virgin" DOS disk - preferably a copy of
  1666.           your DOS distribution disk with only any additional drivers necessary
  1667.           to support the partitioning of your hard disk (and HDTESTDD.BIN) added
  1668.           in CONFIG.SYS - and try to run the HD programs again. If they run in
  1669.           this environment but not in your normal DOS environment, try
  1670.           reconstructing the system under which they failed by adding things one
  1671.           by one until the problem recurs. If you find a specific piece of
  1672.           software which causes the trouble, let me know about the
  1673.           incompatibility.
  1674.  
  1675.           3) If the above approaches do not help, or if HDCHEK runs but HDTEST
  1676.           bombs (the reverse should only happen if HDTEST aborts with an
  1677.           "insufficient memory" error), send me as detailed a description of the
  1678.           problem as possible and I will do my best to diagnose and fix it. A
  1679.           bug report should always include a full description of the system
  1680.                             ______                                         
  1681.           being used (hardware and software), as well as a copy of the output
  1682.                                ___                                           
  1683.           from a run of HDCHEK.
  1684.  
  1685.           I can be contacted by U.S. mail at the address given earlier in the
  1686.           documentation, by BIXMail to pfletcher, or by Compuserve EMail to
  1687.           72255,305.
  1688.  
  1689.  
  1690.                               CHANGES FROM PREVIOUS VERSIONS
  1691.                               ______________________________
  1692.  
  1693.           The first version of the HD programs actually released (not including
  1694.           beta-test versions) was V2.60. The programs have grown and developed
  1695.           gradually, for the most part, but the releases listed below have
  1696.           constituted the most significant "watersheds" - features added and
  1697.           changes made between the listed releases are treated here as if first
  1698.                        _______                                                 
  1699.           included in the next listed release, so some individuals for whom this
  1700.                           ____                                                  
  1701.           
  1702.           
  1703.                                          Page 25 
  1704.            
  1705.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1706.           _______________________________        _______________________________
  1707.           
  1708.           
  1709.           is an upgrade may have packages with some, but not all, of the
  1710.           features listed for a given release. Note that the V4.45 Shareware
  1711.           version of the program is not listed here - it was identical to V4.41
  1712.           except that it included the "fix" for a deficiency which was corrected
  1713.           at V4.70 in the Registered version. Similarly, the V4.98 Shareware
  1714.           version contains all the logic error "fixes" documented for V5.20,
  1715.           together with fixes for one or two other bugs and deficiencies
  1716.           discovered during work on that version. Unless otherwise noted, both
  1717.           programs were affected by the listed changes.
  1718.  
  1719.  
  1720.           Version 5.35 (this version)
  1721.           ____________               
  1722.  
  1723.           1) Support for "incremental" disk testing added.
  1724.  
  1725.           2) Support for MS/PC DOS 5.0 added.
  1726.  
  1727.           3) Limited LIM 4.0 support added (up to 64 KB of LIM memory will be
  1728.           used, if present, sparing the equivalent amount of normal DOS memory).
  1729.  
  1730.           4) Directory tree buffering scheme redesigned to allow more files per
  1731.           partition.
  1732.  
  1733.           5) Miscellaneous minor inaccuracies in the text of error messages
  1734.           corrected.
  1735.  
  1736.  
  1737.           Version 5.23
  1738.           ____________
  1739.  
  1740.           1) Option to proceed after bad 8088 chip identified added.
  1741.  
  1742.           2) Minor changes in error messages.
  1743.  
  1744.           3) Rearranged code and link order to reduce program .EXE size.
  1745.  
  1746.  
  1747.           Version 5.20
  1748.           ____________
  1749.  
  1750.           1) Support for "extended" INT 13 used by Disk Manager and SpeedStor
  1751.           added.
  1752.  
  1753.           2) Support for SpeedStor and Disk Manager large partitions under DOS
  1754.           3.xx added.
  1755.  
  1756.           3) Ability to abort HDTEST cleanly by entering <Ctrl-C> added.
  1757.  
  1758.           4) Bug causing erroneous report of "more than 1024 tracks" on failure
  1759.           to access disk via BIOS fixed.
  1760.  
  1761.           5) Bug causing system to hang at unexpected "Press any key to
  1762.           continue...." prompt if run from .BAT file fixed.
  1763.  
  1764.           
  1765.           
  1766.                                          Page 26 
  1767.            
  1768.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1769.           _______________________________        _______________________________
  1770.           
  1771.           
  1772.           6) Logic errors causing improper "parsing" of long extended partition
  1773.           chains and chains containing DM and SpeedStor partitions corrected.
  1774.  
  1775.  
  1776.           Version 4.95
  1777.           ____________
  1778.  
  1779.           1) Added code to prevent undetected "wrap-around" when using existing
  1780.           INT 13 on a disk with more than 1024 cylinders.
  1781.  
  1782.           2) Deficiency allowing "queueing" of keystrokes in typeahead buffer
  1783.           fixed. <Esc> now produces (almost) immediate response even if other
  1784.           key(s) have been pressed first (HDTEST).
  1785.  
  1786.           3) Copyright screen displayed for minimum of 2 seconds (may be longer
  1787.           if program is being run on a large device).
  1788.  
  1789.           4) Previous restriction on testable FAT size (was 64 Kb) removed.
  1790.  
  1791.           5) /V option added to bypass "virtual mode" prohibition.
  1792.  
  1793.  
  1794.           Version 4.84
  1795.           ____________
  1796.  
  1797.           1) Bug causing the programs to fail if a subdirectory were physically
  1798.           located beyond the 32 Mb boundary on a large (> 32 Mb) device located
  1799.           and corrected.
  1800.  
  1801.           2) Deficiency causing "fallback" to DOS interrupt level under some
  1802.           circumstances when attempting to test "extended devices" on a second
  1803.           physical hard drive fixed. The Shareware V4.45 also included this
  1804.           "fix".
  1805.  
  1806.           3) Log file specification capabilities enhanced (HDTEST).
  1807.  
  1808.           4) DOS 4.0 support added (including BIOS-level access to large
  1809.           partitions).
  1810.  
  1811.           5) Meaningful ERRORLEVEL returned on exit (see "Running HDTEST from a
  1812.           .BAT file) (HDTEST).
  1813.  
  1814.           6) Minor improvements made to memory allocation algorithms.
  1815.  
  1816.           7) Minor changes made to final screen & file output format (HDTEST).
  1817.  
  1818.           8) Minor change to reporting of initialization errors (HDCHEK).
  1819.  
  1820.           9) Fully automatic setting of default ROM BIOS location by CPU type.
  1821.           Meaning of and requirement for /A flag modified.
  1822.  
  1823.           10) Support for large devices under Compaq DOS 3.31 added (see
  1824.           description of /C flag).
  1825.  
  1826.           
  1827.           
  1828.                                          Page 27 
  1829.            
  1830.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1831.           _______________________________        _______________________________
  1832.           
  1833.           
  1834.           11) /Y flag and .BAT file support added (HDTEST).
  1835.  
  1836.           12) /G option added (HDTEST).
  1837.  
  1838.           13) /X option added (HDTEST).
  1839.  
  1840.  
  1841.           Version 4.54
  1842.           ____________
  1843.  
  1844.           1) Deficiency in CPU recognition code (which caused fast AT clones
  1845.           sometimes not to appear to be ATs) fixed.
  1846.                     ___                            
  1847.  
  1848.           2) ANSI.SYS requirement removed.
  1849.  
  1850.           3) Semi-automatic CPU recognition added.
  1851.  
  1852.           4) Pre-boot functionality, /M option, /U option, and extended
  1853.           (segment:offset) form of /H option added.
  1854.  
  1855.  
  1856.           Version 4.41
  1857.           ____________
  1858.  
  1859.           1) Deficiency (introduced at V4.00) causing HDCHEK to issue an
  1860.           incorrect error report on an abort resulting from a FAT comparison
  1861.           error corrected.
  1862.  
  1863.           2) Minor deficiency, causing HDTEST to create an empty log file on the
  1864.           specified device when both a log device and the /P option were
  1865.           specified, corrected.
  1866.  
  1867.           3) Work-around for hardware multi-sector read ECC problem (see
  1868.           Appendix B) added (HDTEST).
  1869.  
  1870.           4) Support for small (<= 10 Mb) hard disks patched to have small
  1871.           clusters and 16-bit FATs added.
  1872.  
  1873.           5) Requirement that command line option flags be separated by one or
  1874.           more spaces or tabs removed.
  1875.  
  1876.           6) /R option added (to HDTEST) for multi-pass disk testing.
  1877.  
  1878.  
  1879.           Version 4.30
  1880.           ____________
  1881.  
  1882.           1) Support for BIOS-level access to DOS 3.3 extended partitions added.
  1883.  
  1884.           2) /Z option added (to HDTEST) to control remapping of unreadable
  1885.           sectors in bad clusters.
  1886.  
  1887.  
  1888.  
  1889.  
  1890.           
  1891.           
  1892.                                          Page 28 
  1893.            
  1894.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1895.           _______________________________        _______________________________
  1896.           
  1897.           
  1898.           Version 4.10
  1899.           ____________
  1900.  
  1901.           1) Assorted minor changes made to screen displays.
  1902.  
  1903.           2) /C option added to allow the programs to be used on some non-IBM
  1904.           compatible MS-DOS systems.
  1905.  
  1906.           3) /D option redefined - old /D option became new /I option.
  1907.  
  1908.           4) /F option added (to HDTEST).
  1909.  
  1910.           5) "Short" form of /H option added.
  1911.  
  1912.  
  1913.           Version 3.13
  1914.           ____________
  1915.  
  1916.           1) Assorted minor bugs and deficiencies in error reporting and
  1917.           termination routines fixed (HDTEST).
  1918.  
  1919.           2) Minor bug affecting reporting of multiple corrected ECC errors
  1920.           fixed (HDTEST).
  1921.  
  1922.           3) Disk reset added before retry on all errors (HDTEST).
  1923.  
  1924.           4) Absolute limit on number of files and directories on device
  1925.           removed.
  1926.  
  1927.           5) Display of total sector/cluster count during testing added
  1928.           (HDTEST).
  1929.  
  1930.           6) /A option added.
  1931.  
  1932.           7) /B option added (HDTEST).
  1933.  
  1934.  
  1935.           Version 2.73
  1936.           ____________
  1937.  
  1938.           1) Bug (in V2.60) which could cause bad termination and possible
  1939.           subdirectory inconsistencies if a sector which was not in use was
  1940.           found to be bad, fixed (HDTEST).
  1941.  
  1942.           2) Bug (in V2.70) which caused HDTEST to enter a terminal input loop
  1943.           if ANSI.SYS was not loaded and <Esc> was entered to abort it, fixed.
  1944.  
  1945.           3) Minor bug in V2.60 (which resulted in a failed directory scan if
  1946.           the program was run on a write-protected device) fixed.
  1947.  
  1948.           4) Internal changes made to avoid interference with expanded memory
  1949.           device handlers.
  1950.  
  1951.           5) Ability to update disk after HDTEST terminated by user (typing
  1952.           <Esc>) added.
  1953.           
  1954.           
  1955.                                          Page 29 
  1956.            
  1957.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  1958.           _______________________________        _______________________________
  1959.           
  1960.           
  1961.           6) /S option to start checking occupied clusters at a given cluster
  1962.           number added (HDTEST).
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.           
  2014.           
  2015.                                          Page 30 
  2016.            
  2017.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2018.           _______________________________        _______________________________
  2019.           
  2020.           
  2021.                            APPENDIX A - SUMMARY OF FLAG SETTINGS
  2022.                            _____________________________________
  2023.  
  2024.           /A(T) - used to tell the HD program that it is being run on an IBM AT
  2025.           (HDCHEK and HDTEST). /A is not equivalent to /HF000.
  2026.  
  2027.           /B(oot/Partition sector test) - used to include the hard disk
  2028.           boot/partition sector in the DOS area for the purposes of read/write
  2029.           testing (HDTEST only).
  2030.  
  2031.           /C(lone BIOS)n - used in systems which do not support the IBM BIOS's
  2032.           INT 11 "equipment determination" BIOS function (e.g. the Tandy 2000).
  2033.           The parameter ("n") is the number of floppy drives attached to the
  2034.           system, which is otherwise determined automatically (HDCHEK and
  2035.           HDTEST).
  2036.  
  2037.           /CQ (Compaq) - used to indicate that the program is running on a
  2038.           Compaq system. If DOS 3.31 (or above) is in use, large (> 32 Mb)
  2039.           devices are supported (HDCHEK and HDTEST).
  2040.  
  2041.           /E(xtended INT 13)x - allows testing of "proprietary" partitions
  2042.           created by SpeedStor and Disk Manager partitioning software, and the
  2043.           use of the "extended" INT 13 definitions which permit SpeedStor and
  2044.           Disk Manager to support disks with more than 1024 cylinders. Use /ES
  2045.           to use SpeedStor extensions and /ED for Disk Manager extensions.
  2046.  
  2047.           /D(OS interrupts) forces the program to use only DOS interrupts
  2048.           (INT 25 and INT 26) for access to the target device. May not be
  2049.           combined with the /I, /H, or /U flag (HDCHEK and HDTEST).
  2050.  
  2051.           /F(ast mode) limits read/write testing to the use of two patterns only
  2052.           (HDTEST only).
  2053.  
  2054.           /G(ive error details) allows the physical disk location of bad sectors
  2055.           to be identified (HDTEST only).
  2056.  
  2057.           /H(ex BIOS address)nnnn[:nnnn] - used to tell the HD programs that the
  2058.           ROM BIOS of the device being tested is located at nnnn, which is
  2059.           interpreted as a Hexadecimal segment address, rather than at the (CPU-
  2060.           dependent) default. The extended (segment:offset) form of the command
  2061.           is used to force the programs to use the given address as the INT 13
  2062.           entry point (HDCHEK and HDTEST).
  2063.  
  2064.           /I(nterrupt 13) - forces the program to use the existing INT 13
  2065.           vector.  This is the default under DOS 2.x. May not be combined with
  2066.           the /D, /H, or /U flag (HDCHEK and HDTEST).
  2067.  
  2068.           /M(ulti-track read problem) - bypasses the multi-track read problem
  2069.           which also prevents certain otherwise IBM-compatible clones from
  2070.           running PC-DOS 3.3 (HDCHEK and HDTEST).
  2071.  
  2072.           /N(o Query) - disables the individual prompts for confirmation which
  2073.           the program normally issues before remapping "special" clusters - does
  2074.           
  2075.           
  2076.                                          Page 31 
  2077.            
  2078.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2079.           _______________________________        _______________________________
  2080.           
  2081.           
  2082.           not prevent the program from prompting for confirmation before
  2083.           ___                                                           
  2084.           updating the disk (HDTEST only).
  2085.  
  2086.           /P(rint) - causes the log file to be directed to the PRN device
  2087.           (HDTEST only).
  2088.  
  2089.           /R(epeat)n - causes HDTEST to perform n complete testing cycles (or to
  2090.           continue until interrupted for n=0) (HDTEST only).
  2091.  
  2092.           /S(tart from)nnnnn - causes HDTEST to start testing occupied clusters
  2093.                                                               ________         
  2094.           at cluster number nnnnn (expressed as a decimal number) (HDTEST only).
  2095.  
  2096.           /U(se existing INT 68 vector) - causes the HD programs to use the
  2097.           existing INT 68 vector as the INT 13 entry point (HDCHEK and HDTEST).
  2098.                    ______                                                      
  2099.  
  2100.           /V(irtual mode) - bypasses normal prohibition on running program if
  2101.           80286 or better CPU is operating in "virtual mode". Allows use with
  2102.           QEMM-386 and 386^Max.
  2103.  
  2104.           /X(clude marked bad sectors) - causes HDTEST to report on but not
  2105.           retest clusters that are already marked as bad (HDTEST only).
  2106.  
  2107.           /Y(es, please remap)n - allows HDTEST to update the disk by remapping
  2108.           up to n new bad sectors without prompting for confirmation (HDTEST
  2109.                                   _______                                   
  2110.           only).
  2111.  
  2112.           /Z(ap bad sectors)n - controls remapping of unreadable sectors in bad
  2113.           clusters (HDTEST only) - n may have one of the following values:
  2114.               0 - Remap clusters with any unreadable sectors to all NULLs
  2115.               1 (default) - Remap only actual unreadable sectors to NULLs
  2116.               2 - Transfer all data read to the new cluster
  2117.  
  2118.  
  2119.  
  2120.  
  2121.  
  2122.  
  2123.  
  2124.  
  2125.  
  2126.  
  2127.  
  2128.  
  2129.  
  2130.  
  2131.  
  2132.  
  2133.  
  2134.  
  2135.  
  2136.  
  2137.  
  2138.           
  2139.           
  2140.                                          Page 32 
  2141.            
  2142.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2143.           _______________________________        _______________________________
  2144.           
  2145.           
  2146.                              APPENDIX B - A HARDWARE TUTORIAL
  2147.                              ________________________________
  2148.  
  2149.           Users of earlier versions of this software repeatedly requested that I
  2150.           provide a more detailed explanation of the significance of some of the
  2151.           error messages displayed by HDTEST when it encounters a bad sector or
  2152.           cluster on the disk. It is not possible to do this without assuming
  2153.           (or imparting) a more detailed understanding of the "nitty-gritty"
  2154.           details of data storage on hard and floppy disks than most people want
  2155.           or need, let alone possess. This Appendix is not, therefore, "required
  2156.           reading" for the safe or effective use of the HD programs. It is
  2157.           intended as a tutorial for those who would like to understand some-
  2158.           thing more of what is really going on on their hard or floppy disk
  2159.                                 ______                                      
  2160.           drive when the little red light comes on.
  2161.  
  2162.           For the purposes of what follows, it is (fortunately) not necessary to
  2163.           know or understand exactly how changes in magnetic flux on the surface
  2164.           of a hard (or floppy) disk are translated into binary data, or vice
  2165.           versa. That could be the subject of another long dissertation. I will
  2166.           simply take for granted that binary data, conceptually organized into
  2167.           8-bit bytes, can be read and written by the disk drive hardware under
  2168.           the command of its controller (which usually resides on a separate
  2169.           card plugged into one of the computer's expansion slots). I will be
  2170.           describing how blocks of data are physically arranged on a disk and
  2171.           how the disk controller goes about ensuring that the data it reads has
  2172.           not been corrupted since it was written.
  2173.  
  2174.           I propose to start off by referring to some of the error-detection and
  2175.           error-correction techniques and procedures that are applied to data
  2176.           stored on magnetic media. These techniques and procedures are
  2177.           necessary because, although magnetic media are very reliable and the
  2178.           technology of recording and playback is well understood, there always
  2179.           remains the possibility that a defect in the medium or some other
  2180.           intercurrent problem may cause the sequence of bytes read back from a
  2181.           disk or tape to be something other than a perfect duplicate of the
  2182.           sequence that was stored. If a single copy of the raw data were all
  2183.           that were recorded, there would be no way of immediately detecting
  2184.           (let alone correcting) such an error. It might be brought to light
  2185.           when the file that was changed caused problems when it is used by or
  2186.           executed as a program, but it might not become apparent until it had
  2187.           propagated itself through and caused problems or errors in multiple
  2188.           other programs or files. This would clearly be an unacceptable state
  2189.           of affairs. In order to prevent this from occurring, then, there
  2190.           should be some means of checking data which is read in from storage
  2191.           for errors, and/or (preferably) of correcting any errors which may
  2192.           have occurred before any use is made of the data.
  2193.                         ______                             
  2194.  
  2195.           Although error checking and/or correction can (and sometimes does)
  2196.           take place at any level from that of the application program down to
  2197.           that of the device controller, I am only going to describe the means
  2198.           that are used by hard and floppy disk controllers. When a block of
  2199.           data is passed to the controller to be written to the disk, a series
  2200.           of arithmetical operations is performed in sequence on all the bytes
  2201.           
  2202.           
  2203.                                          Page 33 
  2204.            
  2205.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2206.           _______________________________        _______________________________
  2207.           
  2208.           
  2209.           in the block, to produce a 2-byte (for diskettes) or multi-byte (for
  2210.           hard drives) code. The diskette controller implements what is known as
  2211.           a cyclic redundancy check (CRC) algorithm, which is optimized to allow
  2212.           detection of all single bit errors and many longer error bursts (it is
  2213.           _________                                                             
  2214.           reasonable to assume that errors will most probably either affect a
  2215.           single bit at random or, if they result from media defects, a number
  2216.           of adjacent bits). The longer (at least 32-bit) error correcting code
  2217.           (ECC) calculated by a hard disk controller gives enough information to
  2218.           allow detection and correction of, at least, all single bit errors and
  2219.                           ______________                                        
  2220.           detection of most likely longer error bursts. The CRC or ECC is saved
  2221.           on disk with the data and is read back in by the controller when the
  2222.           data is read. The controller then compares the saved CRC or ECC with
  2223.           one newly calculated from the data. If the two are identical, the data
  2224.           is assumed to be valid and a successful read is signalled. If there is
  2225.           a discrepancy, a diskette controller always returns the data with a
  2226.           "CRC error", since the CRC code does not contain enough information to
  2227.           allow the incorrect bit or bits to be identified. On a hard disk, if
  2228.           the ECC comparison suggests a correctable error, it will be corrected,
  2229.           and the read call will return with a "Corrected ECC Error" code but
  2230.           with (presumably) valid data in the transfer buffer. If a more
  2231.           extensive error is detected, on the other hand, the call returns with
  2232.           a "Uncorrectable ECC Error" code (which is the same as the CRC error
  2233.           code).
  2234.  
  2235.           The 32-bit ECC used by IBM and many compatible disk manufacturers
  2236.           allows correction of single-bit errors only. Manufacturers of other,
  2237.                                                  ____                         
  2238.           usually more expensive, controllers use longer and more complex ECCs,
  2239.           to allow the correction of some multi-bit errors, but the necessity to
  2240.           minimize the time taken to calculate the ECC (which is part of "access
  2241.           time") sets tight limits on how complex it can be. ECC error
  2242.           correction is unfortunately not infallible. It is possible for a
  2243.                                       ___                                 
  2244.           complex, uncorrectable error to result in the same ECC disparity as a
  2245.                    __                                                          
  2246.           different, correctable, error, so that invalid "corrected" data can be
  2247.                                                                           ______
  2248.           returned. The longer and more complex the ECC, the less likely this
  2249.           becomes, but there is no way of completely avoiding this ambiguity,
  2250.           short of keeping multiple copies of the data on the disk. In addition,
  2251.           some hard disk controllers* apparently abort with the "corrected ECC
  2252.           error" code immediately on encountering a sector containing such an
  2253.                       ___________                                            
  2254.           error, even if it is not the last sector in the block specified by a
  2255.                                ___                                            
  2256.           (multi-sector) read request. This non-intuitive (to say the least of
  2257.           it) behavior can combine with DOS >= 3.x's habit of ignoring corrected
  2258.                                                               ________          
  2259.           ECC errors to result in apparently inexplicable disk-related problems,
  2260.           up to and including system crashes (if the file in which the problem
  2261.           occurred contained executable code). This hardware deficiency may be
  2262.           related to the problems which have plagued users of DOS 3.3 on some
  2263.           (previously) apparently IBM-compatible non-IBM hardware, since these
  2264.           also result from (similar but distinct) deficiencies in the clones'
  2265.  
  2266.           _____________________________________________________________________
  2267.  
  2268.           * This behavior is known to occur with some early Western Digital
  2269.           controllers (1002A-WX1, 1002S-WX2) but it may occur with others, too.
  2270.           
  2271.           
  2272.                                          Page 34 
  2273.            
  2274.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2275.           _______________________________        _______________________________
  2276.           
  2277.           
  2278.           handling of multi-sector disk reads. Prior to V4.36, HDTEST did retry
  2279.                                                                       ___      
  2280.           corrected ECC errors which were reported on the first read of a
  2281.           cluster, but would eventually (if the corrected error persisted)
  2282.           accept the data read as valid and copy and remap it to a "good"
  2283.           cluster. This could cause trouble if the controller had the "immediate
  2284.           abort on corrected ECC error" problem described above and the ECC
  2285.                                                                 ___        
  2286.           error were not in the last sector of the cluster, since the sectors
  2287.           after the "bad" one would not have been read, and would be lost
  2288.           (actually replaced by the corresponding sectors from the previous
  2289.                                                                    ________
  2290.           cluster read) after remapping. On a machine with this problem, DOS
  2291.           would not, of course, have done any better than the earlier versions
  2292.           of HDTEST at reading the bad cluster, and HDTEST at least warned you
  2293.           that there was a problem, but the behavior described was certainly not
  2294.           ideal. From V4.36, HDTEST rereads clusters in which a persistent
  2295.           corrected ECC error is reported on the initial read sector by sector,
  2296.                                                               ________________ 
  2297.           to ensure that all the data in the cluster is transferred when it is
  2298.                          ___                                                  
  2299.           remapped. In most cases (as long as the ECC error was really
  2300.                                                                 ______
  2301.           correctable), this will save the cluster (and the file of which it is
  2302.           a part) intact.
  2303.  
  2304.           DOS allows the programmer and/or computer user to think of and deal
  2305.           with disk data in terms of files, lines, and/or records, but data is
  2306.           always moved between a disk and memory a sector at a time. Any disk
  2307.           read or write request passed to DOS eventually gets translated into a
  2308.           command to read or write one or more sectors on the disk, commencing
  2309.           at a specified head, track, and sector. A floppy disk may have either
  2310.           one or two usable surfaces, corresponding to the top and bottom of the
  2311.                             ________                                            
  2312.           disk. A hard disk usually has at least two surfaces, and may have
  2313.           more, since multiple physical "platters" are frequently incorporated
  2314.           in a single device. Each surface is normally accessed by and
  2315.           corresponds to a single read/write head, which moves radially across
  2316.                                              ____                             
  2317.           it, although one surface on newer disks is often reserved for "servo"
  2318.           tracks, which are written with a special pattern that allows the
  2319.           controller to ensure that the read/write heads are kept exactly
  2320.           aligned with the data tracks. For a single device, the (data) heads
  2321.           are, by convention, numbered sequentially from zero up to one less
  2322.           than the total number present. Each surface is further divided into a
  2323.           number of circumferential tracks (or cylinders) and each track is
  2324.                                     ______     _________                   
  2325.           divided into a number of sectors. Again by convention, the tracks on
  2326.                                    _______                                    
  2327.           each surface are also numbered sequentially from zero, with track zero
  2328.           being the outermost track. The sectors on each track are normally
  2329.           numbered from one to a number corresponding to the total number of
  2330.                         ___                                                 
  2331.           sectors on the track, but adjacent sectors do not normally have
  2332.                                                         ___              
  2333.           consecutive sector numbers. A typical arrangement of the seventeen
  2334.           sectors on a single track of an XT hard disk, for example, would be as
  2335.           follows: 1,8,15,5,12,2,9,16,6,13,3,10,17,7,14,4,11. This "inter-
  2336.                                                                     ______
  2337.           leaving" of sectors helps to make multi-sector disk reads and writes
  2338.           _______                                                             
  2339.           more efficient. The controller requires a finite time to process the
  2340.           data from one sector before it can start reading (or writing) the
  2341.           next. During this time, of course, the disk continues to rotate and
  2342.           one or more of the sectors which physically "follow" the one that was
  2343.           last accessed pass under the read/write head unread. Ideally, the
  2344.           
  2345.           
  2346.                                          Page 35 
  2347.            
  2348.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2349.           _______________________________        _______________________________
  2350.           
  2351.           
  2352.           interleave (number of physical sectors separating consecutively
  2353.           numbered sectors) should be such that the next sector is just about to
  2354.           come under the read-write head when the controller is free to deal
  2355.           with it, but, because this time is not exactly predictable, it is
  2356.           better to be too conservative (as IBM usually is) and make it one or
  2357.           two sectors longer than necessary than to be too optimistic. Too small
  2358.           an interleave value is very undesirable, because it results in the
  2359.           controller having to wait almost a complete disk rotation time for
  2360.           each sector it misses to come round again.
  2361.  
  2362.           At the beginning of each disk sector is an address mark, a short,
  2363.                                                      ____________          
  2364.           recognizable (to the controller) bit sequence containing the track and
  2365.           sector number. The process of writing the address marks for each
  2366.           sector on a disk is known as "low-level" or "sector" formatting. The
  2367.           DOS FORMAT program does this when it is run on floppy disks, but on
  2368.           hard disks the DOS program merely makes sure that all required address
  2369.           marks are present - they are created by the disk manufacturer or
  2370.           supplier's low-level format program, which may or may not be available
  2371.           to the end user. After each address mark there follows a short gap (to
  2372.           allow the controller time to recognize and respond to the address
  2373.           mark), then the CRC or ECC data, then the raw data. A sector normally
  2374.           contains 512 bytes of raw data, and DOS 4.xx requires that this be the
  2375.                                                        ________                 
  2376.           case, but DOS versions prior to 4.00 (and HDTEST) can recognize and
  2377.           deal appropriately with devices with non-standard sector sizes.
  2378.  
  2379.           When a sector read/write command is passed to the disk controller, it
  2380.           (the controller) causes the disk's read/write head to move (seek) to
  2381.                                                                       ____    
  2382.           the specified track, waits a few milliseconds for it to settle down,
  2383.           and then starts to "pay attention to" the data passing underneath it.
  2384.           The controller locates and reads the address marks to confirm that the
  2385.           read/write head is positioned at the correct track and to identify
  2386.           each sector. If data is being read from the disk, the raw data and
  2387.           recorded CRC or ECC from the requested sector(s) are transferred into
  2388.           the disk controller's internal buffers and (assuming that no errors
  2389.           are detected), thence to main memory. If data is being written, the
  2390.           controller derives the error-checking data from the raw data and
  2391.           writes both to the disk. Some of this process is under the direct
  2392.           control of the controller hardware, but it is supervised by the
  2393.           device's ROM BIOS, which is responsible for error-reporting. Errors
  2394.           can occur at almost any stage of the read/write process, but (if the
  2395.           disk is working at all) usually result from media defects or problems
  2396.           developing in the mechanical components of the hard disk drive. Media
  2397.           defects, once present, are generally constant in size and position
  2398.           (although jarring a disk while it is being written to may sometimes
  2399.           generate a temporary bad sector).
  2400.                      _________             
  2401.  
  2402.  
  2403.                                  HDTEST DISK ERROR REPORTS
  2404.                                  _________________________
  2405.  
  2406.           When HDTEST detects an error during read/write testing of a sector or
  2407.           cluster which has not previously been marked as bad, a (normally)
  2408.           four-line error message is printed, either to the screen (by default),
  2409.           
  2410.           
  2411.                                          Page 36 
  2412.            
  2413.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2414.           _______________________________        _______________________________
  2415.           
  2416.           
  2417.           to the printer (/P option), or to the logging file (if an output
  2418.           device was specified). The first line of the message simply indicates
  2419.           the sector or cluster number at which the error occurred. The second
  2420.           line indicates what sort of error was detected and during what phase
  2421.           of read/write testing it occurred. The third line indicates whether
  2422.           HDTEST was able to recover and/or remap the data from the bad sector
  2423.           or cluster, and the fourth indicates either the file which a bad
  2424.           cluster formed part of or that the cluster was not in use. If it was
  2425.           not possible to read one or more sectors from a cluster which
  2426.           contained data (unrecoverable read error), a further two-line message
  2427.           is printed which notes how many sectors were unreadable and how the
  2428.                                           _______                            
  2429.           data from the bad cluster has been remapped (which depends on whether
  2430.           a /Zn option was specified on the command line). If the /M flag is not
  2431.           specified when HDTEST is run on a system that suffers from the "multi-
  2432.           track read" problems discussed in the main part of the documentation,
  2433.           multiple bad clusters may be reported with no errors persisting on
  2434.                                                      __                     
  2435.           sector-by sector reading. These reports should disappear if the /M
  2436.           flag is used.
  2437.  
  2438.           If the "verbose" form of the /G option is used, the bad sector report
  2439.           will contain the equivalent of the second and third lines of the bad
  2440.           cluster report for each bad sector. Note that, if the /X option is not
  2441.                          ___________________                                    
  2442.           used to prevent testing of previously flagged bad clusters, these may
  2443.           give rise to spurious warnings of possible data loss in the third line
  2444.                        ________                                                 
  2445.           of the bad sector report. If no unrecoverable bad clusters were
  2446.                      ______                                 ________     
  2447.           reported, such warnings can safely be ignored. If the default form of
  2448.           the /G option is used, the bad sector report gives only a Hex error
  2449.           code for each bad sector. The LSB of this code is the value returned
  2450.           (in AH) by INT 13. The MSB of the code depends on the phase of testing
  2451.           during which the error occurred. In general, if the first digit (of a
  2452.           four digit code) is C or above, an unrecoverable error occurred, but
  2453.           error codes FFFD through FFFF have special meanings and usually
  2454.           indicate recovered errors.
  2455.  
  2456.           When the program detects an error during read/write testing of a
  2457.           sector in the DOS area, only the first three lines described above are
  2458.           printed and the program aborts. The remainder of this Appendix
  2459.           contains more details of and further information on the possible
  2460.           contents of lines two and three of HDTEST's disk error message.
  2461.  
  2462.           The second line of the disk read/write error message will usually take
  2463.           the form: "[Error Type] occurred during [phase of testing]". Possible
  2464.           values for [Error Type] are as follows (in alphabetical order):
  2465.  
  2466.           Address Mark Not Found - this is a fairly common error reported for
  2467.           bad blocks which are present from "scratch" on a new disk, since a
  2468.           significant media defect may well not retain sector formatting data
  2469.           and/or the manufacturer may have made sure that a known bad track on
  2470.           the disk will not be used by deliberately not writing address marks
  2471.           there. If new bad clusters are reported with this error message, it is
  2472.           likely that the hard disk surface has been physically damaged (perhaps
  2473.  
  2474.           
  2475.           
  2476.                                          Page 37 
  2477.            
  2478.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2479.           _______________________________        _______________________________
  2480.           
  2481.           
  2482.           by a shock to the drive) but possible that the controller has a
  2483.           problem.
  2484.  
  2485.           Bad Controller - this means what it says, but check that all boards
  2486.           and cables are properly seated before giving up.
  2487.  
  2488.           Bad Sector - the BIOS was instructed to read a sector number which
  2489.           should not (according to its configuration data) exist on the device.
  2490.           This indicates either an internal program error or that the program is
  2491.           having a problem determining the physical layout of the disk. Check
  2492.           the values reported by HDCHEK against those in the disk documentation.
  2493.  
  2494.           Bad Track - analogous to "Bad Sector".
  2495.  
  2496.           Buffer Comparison - the data read from a sector differs from that
  2497.           written to it. This should not happen, since it suggests either that
  2498.           the device's error-detection functionality has failed or that it has
  2499.           been overwhelmed. If it does occur, the most likely causes are
  2500.           controller and memory problems (in that order of likelihood).
  2501.  
  2502.           Corrected ECC - as discussed at some length above, the data retrieved
  2503.           from a hard disk was incorrect but the device's error-correction
  2504.           hardware was (probably) able to correct it.
  2505.  
  2506.           DMA Boundary Violation - should not occur (HDTEST positions its
  2507.           buffers to avoid crossing segment boundaries). Suggests either an
  2508.           internal program error or a controller/BIOS problem.
  2509.  
  2510.           Hardware Timeout - a seek or other operation was not completed within
  2511.           the maximum time allowed by the BIOS. Check connections, reseat
  2512.           boards, otherwise suspect the mechanics of the disk.
  2513.  
  2514.           Init Fail - should not occur (on a working disk).
  2515.  
  2516.           Internal - internal program error. Make sure that your working copy of
  2517.           HDTEST has not been corrupted. The disk is probably not defective.
  2518.                                                      ________               
  2519.  
  2520.           Invalid Command - should not occur. Treat as Internal Error.
  2521.  
  2522.           Multiple Errors - one or more additional errors occurred while HDTEST
  2523.           was attempting to recover from an initial one. Multiple phase report
  2524.           lines will be printed but the error types cannot be further specified.
  2525.  
  2526.           Recovered - HDTEST recovered from the error and did not report on the
  2527.           error type (should not occur).
  2528.  
  2529.           Reset Fail - The device could not be reset (after an error). Usually
  2530.           indicates major problems with the disk or controller, but check
  2531.           connections, etc.
  2532.  
  2533.           Sector Not Found - the requested sector's address mark was not found.
  2534.           Likely to result from a media defect.
  2535.           
  2536.           
  2537.                                          Page 38 
  2538.            
  2539.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2540.           _______________________________        _______________________________
  2541.           
  2542.           
  2543.           Seek Fail - after a seek to a track, the controller found that the
  2544.           read/write head was not positioned correctly. Usually indicates a
  2545.           significant problem with the (drive) hardware.
  2546.  
  2547.           Sense Fail - the controller cannot find the drive! Check connections,
  2548.           etc.
  2549.  
  2550.           Uncorrected ECC - data error too major to be corrected. Usually a
  2551.           media defect. This message will also be produced if a CRC error is
  2552.           detected on a floppy disk.
  2553.  
  2554.           Undefined - the BIOS cannot figure out what went wrong, but something
  2555.           did!
  2556.  
  2557.           Unknown - likewise!
  2558.  
  2559.           Write Protection - HDTEST is attempting to write to a write-protected
  2560.           device.
  2561.  
  2562.  
  2563.           Possible forms for the rest of the second line are as follows:
  2564.  
  2565.           ... Error (unrecovered) occurred during first read - the cluster could
  2566.           not be read without error in five tries before a seek to the other
  2567.           "end" of the disk.
  2568.  
  2569.           ... Error occurred during first read - the error occurred during the
  2570.           first read but was recovered after one or more retries.
  2571.  
  2572.           ... Error occurred during read after seek - the error occurred when
  2573.           the cluster was read after a seek away.
  2574.  
  2575.           ... Error occurred during pattern read/writes - the error occurred
  2576.           during the pattern read/write phase of testing.
  2577.  
  2578.           ... Error occurred during final write - the error occurred when the
  2579.           saved copy of the cluster was being restored to the disk.
  2580.  
  2581.           ... Error occurred during read after final write - the error occurred
  2582.           when the restored cluster was being read back.
  2583.  
  2584.           ... (Buffer comparison) error occurred after final read - the copy of
  2585.           the cluster read back after restoration to the disk differed from its
  2586.           original memory image.
  2587.  
  2588.  
  2589.           There are only three basic forms of the third line:
  2590.  
  2591.           This error is (or "These errors are") recoverable (no data loss has
  2592.           occurred). - the bad cluster was read successfully and has been
  2593.           successfully restored to its original form, but it remains suspect and
  2594.           will (with your permission) be remapped.
  2595.           
  2596.           
  2597.                                          Page 39 
  2598.            
  2599.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2600.           _______________________________        _______________________________
  2601.           
  2602.           
  2603.           This error is unrecoverable, but remapping is possible. - the bad
  2604.           cluster was read successfully but has not been restored to its
  2605.                                                 ___                     
  2606.           original form. Remapping should be successful, but the data will be
  2607.           lost if this is not permitted.
  2608.  
  2609.           This error is unrecoverable, and data may be lost! - the bad cluster
  2610.           was not read successfully and will be remapped as provided by the
  2611.           value of the /Z switch parameter if remapping is permitted. In any
  2612.           event, some data loss has almost certainly occurred.
  2613.  
  2614.  
  2615.  
  2616.  
  2617.  
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624.  
  2625.  
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.  
  2637.  
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.  
  2645.  
  2646.  
  2647.  
  2648.  
  2649.  
  2650.  
  2651.  
  2652.  
  2653.  
  2654.  
  2655.  
  2656.           
  2657.           
  2658.                                          Page 40 
  2659.                 
  2660.                Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2661.                _______________________________        _______________________________
  2662.                
  2663.                
  2664.  
  2665.                    APPENDIX C - EXAMPLE PROGRAM RUNS
  2666.                    _________________________________
  2667.  
  2668.      Screen display from successful run of HDCHEK on partition occupying the
  2669.      whole of a 20 Mb hard disk:
  2670.  
  2671. Device C: appears to be the DOS partition of a hard disk
  2672. It contains 41531 sectors
  2673. It starts at absolute sector 17 on the disk      {THIS IS CORRECT}
  2674.                                                   _______________ 
  2675. The total partition size is approximately 20 Mb
  2676. There are 4 heads and 17 sectors/track
  2677. Sector size is 512 bytes
  2678. Each of the 2 (16 bit) FATs occupies 41 sectors
  2679. The Root Directory occupies 32 sectors
  2680. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2681. consisting of 4 sectors
  2682. The directory scan was successful; a total of 1260 files and subdirectories
  2683. was found.
  2684.  
  2685.      Screen display from successful run of HDCHEK on a freshly FORMATted DSDD
  2686.      9-sector floppy disk:
  2687.  
  2688. Device A: is not a hard disk - using DOS interrupts
  2689.  
  2690. Device A: is a floppy disk
  2691. The disk contains 720 sectors
  2692. There are 2 heads and 9 sectors/track
  2693. Sector size is 512 bytes
  2694. Each of the 2 (12 bit) FATs occupies 2 sectors
  2695. The Root Directory occupies 7 sectors
  2696. The data area starts at DOS sector 12, and contains 354 clusters, each
  2697. consisting of 2 sectors
  2698. The directory scan was successful; a total of 0 files and subdirectories
  2699. was found.
  2700.  
  2701.      Screen display from run of HDCHEK on 20 Mb DOS partition - directory
  2702.      structure bad or unrecognizable:
  2703.  
  2704. Device C: appears to be the DOS partition of a hard disk
  2705. It contains 41531 sectors
  2706. It starts at absolute sector 17 on the disk
  2707. The total partition size is approximately 20 Mb
  2708. There are 4 heads and 17 sectors/track
  2709. Sector size is 512 bytes
  2710. Each of the 2 (16 bit) FATs occupies 41 sectors
  2711. The Root Directory occupies 32 sectors
  2712. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2713. consisting of 4 sectors
  2714. The preliminary directory scan failed.
  2715.  
  2716.  
  2717.  
  2718.                
  2719.                
  2720.                                               Page 41 
  2721.                 
  2722.                Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2723.                _______________________________        _______________________________
  2724.                
  2725.                
  2726.      Screen display from run of HDCHEK on 20 Mb DOS partition - FATs not
  2727.      identical:
  2728.  
  2729. FATS are different
  2730. FAT discrepancy at byte 20F - FAT 1 has FF; FAT 2 has F8
  2731. Continue comparison (Y/N)? [Y]: n     {user input}
  2732.                                 _                 
  2733.  
  2734. Device C: appears to be the DOS partition of a hard disk
  2735. It contains 41531 sectors
  2736. It starts at absolute sector 17 on the disk
  2737. The total partition size is approximately 20 Mb
  2738. There are 4 heads and 17 sectors/track
  2739. Sector size is 512 bytes
  2740. Each of the 2 (16 bit) FATs occupies 41 sectors
  2741. The Root Directory occupies 32 sectors
  2742. The data area starts at DOS sector 115, and contains 10354 clusters, each
  2743. consisting of 4 sectors
  2744.  
  2745.  
  2746.  
  2747.      Screen display from run of HDCHEK - program unable to deduce disk
  2748.      structure - disk not recognizable as a DOS device:
  2749.  
  2750. Unrecognized media descriptor byte! - see error code
  2751. Error Code = F1      {F1 is not a media descriptor byte used by DOS}
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.  
  2777.  
  2778.  
  2779.                
  2780.                
  2781.                                               Page 42 
  2782.            
  2783.           Documentation for HDTEST V5.35          Copyright 1991, P. R. Fletcher
  2784.           _______________________________        _______________________________
  2785.           
  2786.           
  2787.      Log file from successful run of HDTEST on 20 Mb DOS partition:
  2788.  
  2789.      HDTEST Log File - Wed Jan 07 11:44:52 1986
  2790.      Testing Device C:
  2791.  
  2792.      No new bad clusters identified - HDTEST finished.
  2793.      Wed Jan 07 16:10:41 1987
  2794.  
  2795.  
  2796.      Log file from run of HDTEST on 20 Mb DOS partition - one bad cluster
  2797.      detected and remapped:
  2798.  
  2799.      HDTEST Log File - Mon Jan 05 21:09:32 1987
  2800.      Testing Device C:
  2801.  
  2802.      Read/Write error at cluster number 7623!!
  2803.      Corrected ECC error occurred during pattern read/writes
  2804.      This error is recoverable (no data loss has occurred).
  2805.      Bad cluster is in file \MYFILES\DATA5\FFT1234.DAT
  2806.  
  2807.      1 new bad clusters identified, marked, and remapped - HDTEST finished.
  2808.      Tue Jan 06 05:08:04 1987
  2809.  
  2810.  
  2811.  
  2812.  
  2813.  
  2814.  
  2815.  
  2816.  
  2817.  
  2818.  
  2819.  
  2820.  
  2821.  
  2822.  
  2823.  
  2824.  
  2825.  
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.           
  2840.           
  2841.                                          Page 43 
  2842.  
  2843.                         REGISTRATION FORM - HDTEST V5.35
  2844.                         ________________________________
  2845.  
  2846.      Please complete this form and return it with a check or money order for
  2847.      $35.00 (+ $5.00 for shipping outside North America) or equivalent to:
  2848.  
  2849.                      Peter R. Fletcher
  2850.                      1515 West Montgomery Avenue
  2851.                      Rosemont
  2852.                      PA 19010
  2853.                      U.S.A.
  2854.  
  2855.      None of the information on this form will be passed on to any other
  2856.      individual or commercial organization.
  2857.  
  2858.      --------------------------------------------------------------------------
  2859.  
  2860.      This information is required to process your Registration:
  2861.  
  2862.      Last Name:____________________________  Other Names:______________________
  2863.  
  2864.      Address:______________________________  Town/City:________________________
  2865.  
  2866.      State:_____________  Post Code:____________  Telephone:_________________
  2867.                                                            (evenings/weekends)
  2868.  
  2869.      I understand that this software is supplied without warranty, express or
  2870.      implied, and agree not to hold its author liable for any direct or
  2871.      consequential loss arising out of my use of it.
  2872.  
  2873.      Signature:______________________________
  2874.  
  2875.      -------------------------------------------------------------------------
  2876.  
  2877.      You are requested, but not required, also to answer the following
  2878.      questions:
  2879.  
  2880.      On What type(s) of computer are you using HDTEST? _________________________
  2881.  
  2882.      CPU (8088, 8086, etc.)? __________   Amount of RAM (kB)? ____________
  2883.  
  2884.      Type & Size of Hard Disk(s)? ____________________________________
  2885.  
  2886.      Make and Type of Hard Disk Controller(s)? ______________________________
  2887.  
  2888.      Do you own a Modem?                                             Y  N
  2889.  
  2890.      Are you a member of BIX?   Y  N        Compuserve?              Y  N
  2891.  
  2892.      How did you obtain/hear about this program?
  2893.  
  2894.      Did you think that the $35.00 registration fee for this program was:
  2895.  
  2896.      Very Good Value?              About Right?             Excessively High?
  2897.  
  2898.  
  2899.      Are there any other utility programs that you would like to see made
  2900.      available as "User Supported Software"? What sort of programs?
  2901.  
  2902.